diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4
index f0fe72e..6b2c345 100644
--- a/ax_init_standard_project.m4
+++ b/ax_init_standard_project.m4
@@ -598,7 +598,7 @@ doc: doxyfile @NEED_PLANTUML_TRUE@ gen-uml-images
@NEED_PLANTUML_TRUE@ done
clean-documentation:
- -rm doxygen.errors @PDF_DOC@ @NEED_PLANTUML_TRUE@
+ -rm doxygen.errors @PDF_DOC@
@NEED_PLANTUML_TRUE@ -rm -rf gen-uml-images
distclean-documentation:
-rm -r html
diff --git a/nodejs/node_modules/ejs/Jakefile b/nodejs/node_modules/ejs/Jakefile
index 0362e98..3789eee 100644
--- a/nodejs/node_modules/ejs/Jakefile
+++ b/nodejs/node_modules/ejs/Jakefile
@@ -15,7 +15,7 @@ task('clean', ['clobber'], function () {
});
task('browserify', {async: true}, function () {
- jake.exec('./node_modules/browserify/bin/cmd.js lib/ejs.js > ejs.js',
+ jake.exec('./node_modules/browserify/bin/cmd.js --standalone ejs lib/ejs.js > ejs.js',
buildOpts, function () {
console.log('Browserification completed.');
setTimeout(complete, 0);
@@ -34,6 +34,7 @@ publishTask('ejs', ['build'], function () {
this.packageFiles.include([
'Jakefile'
, 'README.md'
+ , 'LICENSE'
, 'package.json'
, 'ejs.js'
, 'ejs.min.js'
@@ -41,5 +42,3 @@ publishTask('ejs', ['build'], function () {
, 'test/**'
]);
});
-
-
diff --git a/nodejs/node_modules/ejs/LICENSE b/nodejs/node_modules/ejs/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/nodejs/node_modules/ejs/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/nodejs/node_modules/ejs/README.md b/nodejs/node_modules/ejs/README.md
index f0bffdb..1dd860f 100644
--- a/nodejs/node_modules/ejs/README.md
+++ b/nodejs/node_modules/ejs/README.md
@@ -3,7 +3,7 @@
Embedded JavaScript templates
[](https://travis-ci.org/mde/ejs)
-[](https://david-dm.org/mde/ejs#info=devDependencies)
+[](https://david-dm.org/mde/ejs?type=dev)
## Installation
@@ -14,10 +14,11 @@ $ npm install ejs
## Features
* Control flow with `<% %>`
- * Escaped output with `<%= %>`
+ * Escaped output with `<%= %>` (escape function configurable)
* Unescaped raw output with `<%- %>`
- * Trim-mode ('newline slurping') with `-%>` ending tag
- * Custom delimiters (e.g., use ' ?>' instead of '<% %>')
+ * Newline-trim mode ('newline slurping') with `-%>` ending tag
+ * Whitespace-trim mode (slurp all whitespace) for control flow with `<%_ _%>`
+ * Custom delimiters (e.g., use ` ?>` instead of `<% %>`)
* Includes
* Client-side support
* Static caching of intermediate JavaScript
@@ -32,6 +33,8 @@ $ npm install ejs
<% } %>
```
+Try EJS online at: https://ionicabizau.github.io/ejs-playground/.
+
## Usage
```javascript
@@ -41,43 +44,70 @@ template(data);
ejs.render(str, data, options);
// => Rendered HTML string
+
+ejs.renderFile(filename, data, options, function(err, str){
+ // str => Rendered HTML string
+});
```
-You can also use the shortcut `ejs.render(dataAndOptions);` where you pass
+It is also possible to use `ejs.render(dataAndOptions);` where you pass
everything in a single object. In that case, you'll end up with local variables
-for all the passed options.
+for all the passed options. However, be aware that your code could break if we
+add an option with the same name as one of your data object's properties.
+Therefore, we do not recommend using this shortcut.
## Options
- `cache` Compiled functions are cached, requires `filename`
- - `filename` Used by `cache` to key caches, and for includes
+ - `filename` The name of the file being rendered. Not required if you
+ are using `renderFile()`. Used by `cache` to key caches, and for includes.
+ - `root` Set project root for includes with an absolute path (/file.ejs).
- `context` Function execution context
- `compileDebug` When `false` no debug instrumentation is compiled
- - `client` Returns standalone compiled function
+ - `client` When `true`, compiles a function that can be rendered
+ in the browser without needing to load the EJS Runtime
+ ([ejs.min.js](https://github.com/mde/ejs/releases/latest)).
- `delimiter` Character to use with angle brackets for open/close
- `debug` Output generated function body
- - `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object.
+ - `strict` When set to `true`, generated function is in strict mode
+ - `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object. Set to `false` in strict mode.
+ - `localsName` Name to use for the object storing local variables when not using `with` Defaults to `locals`
- `rmWhitespace` Remove all safe-to-remove whitespace, including leading
and trailing whitespace. It also enables a safer version of `-%>` line
slurping for all scriptlet tags (it does not strip new lines of tags in
the middle of a line).
+ - `escape` The escaping function used with `<%=` construct. It is
+ used in rendering and is `.toString()`ed in the generation of client functions. (By default escapes XML).
+
+This project uses [JSDoc](http://usejsdoc.org/). For the full public API
+documentation, clone the repository and run `npm run doc`. This will run JSDoc
+with the proper options and output the documentation to `out/`. If you want
+the both the public & private API docs, run `npm run devdoc` instead.
## Tags
- `<%` 'Scriptlet' tag, for control-flow, no output
- - `<%=` Outputs the value into the template (HTML escaped)
+ - `<%_` 'Whitespace Slurping' Scriptlet tag, strips all whitespace before it
+ - `<%=` Outputs the value into the template (escaped)
- `<%-` Outputs the unescaped value into the template
- `<%#` Comment tag, no execution, no output
- `<%%` Outputs a literal '<%'
+ - `%%>` Outputs a literal '%>'
- `%>` Plain ending tag
- `-%>` Trim-mode ('newline slurp') tag, trims following newline
+ - `_%>` 'Whitespace Slurping' ending tag, removes all whitespace after it
+
+For the full syntax documentation, please see [docs/syntax.md](https://github.com/mde/ejs/blob/master/docs/syntax.md).
## Includes
Includes either have to be an absolute path, or, if not, are assumed as
-relative to the template with the `include` call. (This requires the
-`filename` option.) For example if you are including `./views/user/show.ejs`
-from `./views/users.ejs` you would use `<%- include('user/show') %>`.
+relative to the template with the `include` call. For example if you are
+including `./views/user/show.ejs` from `./views/users.ejs` you would
+use `<%- include('user/show') %>`.
+
+You must specify the `filename` option for the template with the `include`
+call unless you are using `renderFile()`.
You'll likely want to use the raw output tag (`<%-`) with your include to avoid
double-escaping the HTML output.
@@ -152,9 +182,44 @@ including headers and footers, like so:
## Client-side support
Go to the [Latest Release](https://github.com/mde/ejs/releases/latest), download
-`./ejs.js` or `./ejs.min.js`.
+`./ejs.js` or `./ejs.min.js`. Alternately, you can compile it yourself by cloning
+the repository and running `jake build` (or `$(npm bin)/jake build` if jake is
+not installed globally).
-Include one of these on your page, and `ejs.render(str)`.
+Include one of these files on your page, and `ejs` should be available globally.
+
+### Example
+
+```html
+
+
+
+```
+
+### Caveats
+
+Most of EJS will work as expected; however, there are a few things to note:
+
+1. Obviously, since you do not have access to the filesystem, `ejs.renderFile()` won't work.
+2. For the same reason, `include`s do not work unless you use an `IncludeCallback`. Here is an example:
+ ```javascript
+ var str = "Hello <%= include('file', {person: 'John'}); %>",
+ fn = ejs.compile(str, {client: true});
+
+ fn(data, null, function(path, d){ // IncludeCallback
+ // path -> 'file'
+ // d -> {person: 'John'}
+ // Put your code here
+ // Return the contents of file as a string
+ }); // returns rendered string
+ ```
## Related projects
@@ -174,5 +239,3 @@ Licensed under the Apache License, Version 2.0
- - -
EJS Embedded JavaScript templates copyright 2112
mde@fleegix.org.
-
-
diff --git a/nodejs/node_modules/ejs/ejs.js b/nodejs/node_modules/ejs/ejs.js
index 620f553..6d6b4d4 100644
--- a/nodejs/node_modules/ejs/ejs.js
+++ b/nodejs/node_modules/ejs/ejs.js
@@ -1,4 +1,4 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1;
+ var func;
+ var filename = options.filename;
+ var hasTemplate = arguments.length > 1;
if (options.cache) {
- if (!path) {
+ if (!filename) {
throw new Error('cache option requires a filename');
}
- fn = exports.cache.get(path);
- if (fn) {
- return fn;
+ func = exports.cache.get(filename);
+ if (func) {
+ return func;
}
if (!hasTemplate) {
- template = fs.readFileSync(path).toString().replace(_BOM, '');
+ template = fs.readFileSync(filename).toString().replace(_BOM, '');
}
}
else if (!hasTemplate) {
// istanbul ignore if: should not happen at all
- if (!path) {
+ if (!filename) {
throw new Error('Internal EJS error: no file name or template '
+ 'provided');
}
- template = fs.readFileSync(path).toString().replace(_BOM, '');
+ template = fs.readFileSync(filename).toString().replace(_BOM, '');
}
- fn = exports.compile(template, options);
+ func = exports.compile(template, options);
if (options.cache) {
- exports.cache.set(path, fn);
+ exports.cache.set(filename, func);
}
- return fn;
+ return func;
}
/**
@@ -167,10 +189,7 @@ function handleCache(options, template) {
function includeFile(path, options) {
var opts = utils.shallowCopy({}, options);
- if (!opts.filename) {
- throw new Error('`include` requires the \'filename\' option.');
- }
- opts.filename = exports.resolveInclude(path, opts.filename);
+ opts.filename = getIncludePath(path, opts);
return handleCache(opts);
}
@@ -180,24 +199,24 @@ function includeFile(path, options) {
* @memberof module:ejs-internal
* @param {String} path path for the specified file
* @param {Options} options compilation options
- * @return {String}
+ * @return {Object}
* @static
*/
function includeSource(path, options) {
- var opts = utils.shallowCopy({}, options)
- , includePath
- , template;
- if (!opts.filename) {
- throw new Error('`include` requires the \'filename\' option.');
- }
- includePath = exports.resolveInclude(path, opts.filename);
+ var opts = utils.shallowCopy({}, options);
+ var includePath;
+ var template;
+ includePath = getIncludePath(path,opts);
template = fs.readFileSync(includePath).toString().replace(_BOM, '');
-
opts.filename = includePath;
var templ = new Template(template, opts);
templ.generateSource();
- return templ.source;
+ return {
+ source: templ.source,
+ filename: includePath,
+ template: template
+ };
}
/**
@@ -214,10 +233,9 @@ function includeSource(path, options) {
*/
function rethrow(err, str, filename, lineno){
- var lines = str.split('\n')
- , start = Math.max(lineno - 3, 0)
- , end = Math.min(lines.length, lineno + 3);
-
+ var lines = str.split('\n');
+ var start = Math.max(lineno - 3, 0);
+ var end = Math.min(lines.length, lineno + 3);
// Error context
var context = lines.slice(start, end).map(function (line, i){
var curr = i + start + 1;
@@ -302,10 +320,9 @@ exports.compile = function compile(template, opts) {
* @public
*/
-exports.render = function (template, data, opts) {
- data = data || {};
- opts = opts || {};
- var fn;
+exports.render = function (template, d, o) {
+ var data = d || {};
+ var opts = o || {};
// No options object -- if there are optiony names
// in the data, copy them to options
@@ -330,12 +347,12 @@ exports.render = function (template, data, opts) {
*/
exports.renderFile = function () {
- var args = Array.prototype.slice.call(arguments)
- , path = args.shift()
- , cb = args.pop()
- , data = args.shift() || {}
- , opts = args.pop() || {}
- , result;
+ var args = Array.prototype.slice.call(arguments);
+ var filename = args.shift();
+ var cb = args.pop();
+ var data = args.shift() || {};
+ var opts = args.pop() || {};
+ var result;
// Don't pollute passed in opts obj with new vals
opts = utils.shallowCopy({}, opts);
@@ -343,9 +360,16 @@ exports.renderFile = function () {
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length == 3) {
- cpOptsInData(data, opts);
+ // Express 4
+ if (data.settings && data.settings['view options']) {
+ cpOptsInData(data.settings['view options'], opts);
+ }
+ // Express 3 and lower
+ else {
+ cpOptsInData(data, opts);
+ }
}
- opts.filename = path;
+ opts.filename = filename;
try {
result = handleCache(opts)(data);
@@ -380,55 +404,54 @@ function Template(text, opts) {
options.debug = !!opts.debug;
options.filename = opts.filename;
options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
- options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ options.strict = opts.strict || false;
options.context = opts.context;
options.cache = opts.cache || false;
options.rmWhitespace = opts.rmWhitespace;
+ options.root = opts.root;
+ options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
+
+ if (options.strict) {
+ options._with = false;
+ }
+ else {
+ options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ }
+
this.opts = options;
this.regex = this.createRegex();
}
Template.modes = {
- EVAL: 'eval'
-, ESCAPED: 'escaped'
-, RAW: 'raw'
-, COMMENT: 'comment'
-, LITERAL: 'literal'
+ EVAL: 'eval',
+ ESCAPED: 'escaped',
+ RAW: 'raw',
+ COMMENT: 'comment',
+ LITERAL: 'literal'
};
Template.prototype = {
createRegex: function () {
- var str = _REGEX_STRING
- , delim = utils.escapeRegExpChars(this.opts.delimiter);
+ var str = _REGEX_STRING;
+ var delim = utils.escapeRegExpChars(this.opts.delimiter);
str = str.replace(/%/g, delim);
return new RegExp(str);
- }
+ },
-, compile: function () {
- var src
- , fn
- , opts = this.opts
- , prepended = ''
- , appended = ''
- , escape = opts.escapeFunction;
-
- if (opts.rmWhitespace) {
- // Have to use two separate replace here as `^` and `$` operators don't
- // work well with `\r`.
- this.templateText =
- this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
- }
-
- // Slurp spaces and tabs before <%_ and after _%>
- this.templateText =
- this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
+ compile: function () {
+ var src;
+ var fn;
+ var opts = this.opts;
+ var prepended = '';
+ var appended = '';
+ var escape = opts.escapeFunction;
if (!this.source) {
this.generateSource();
prepended += ' var __output = [], __append = __output.push.bind(__output);' + '\n';
if (opts._with !== false) {
- prepended += ' with (' + exports.localsName + ' || {}) {' + '\n';
+ prepended += ' with (' + opts.localsName + ' || {}) {' + '\n';
appended += ' }' + '\n';
}
appended += ' return __output.join("");' + '\n';
@@ -461,8 +484,12 @@ Template.prototype = {
}
}
+ if (opts.strict) {
+ src = '"use strict";\n' + src;
+ }
+
try {
- fn = new Function(exports.localsName + ', escape, include, rethrow', src);
+ fn = new Function(opts.localsName + ', escape, include, rethrow', src);
}
catch(e) {
// istanbul ignore else
@@ -495,20 +522,34 @@ Template.prototype = {
};
returnedFn.dependencies = this.dependencies;
return returnedFn;
- }
+ },
-, generateSource: function () {
- var self = this
- , matches = this.parseTemplateText()
- , d = this.opts.delimiter;
+ generateSource: function () {
+ var opts = this.opts;
+
+ if (opts.rmWhitespace) {
+ // Have to use two separate replace here as `^` and `$` operators don't
+ // work well with `\r`.
+ this.templateText =
+ this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
+ }
+
+ // Slurp spaces and tabs before <%_ and after _%>
+ this.templateText =
+ this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
+
+ var self = this;
+ var matches = this.parseTemplateText();
+ var d = this.opts.delimiter;
if (matches && matches.length) {
matches.forEach(function (line, index) {
- var opening
- , closing
- , include
- , includeOpts
- , includeSrc;
+ var opening;
+ var closing;
+ var include;
+ var includeOpts;
+ var includeObj;
+ var includeSrc;
// If this is an opening tag, check for closing tags
// FIXME: May end up with some false positives here
// Better to store modes as k/v with '<' + delimiter as key
@@ -526,9 +567,23 @@ Template.prototype = {
// Must be in EVAL or RAW mode
if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) {
includeOpts = utils.shallowCopy({}, self.opts);
- includeSrc = includeSource(include[1], includeOpts);
- includeSrc = ' ; (function(){' + '\n' + includeSrc +
- ' ; })()' + '\n';
+ includeObj = includeSource(include[1], includeOpts);
+ if (self.opts.compileDebug) {
+ includeSrc =
+ ' ; (function(){' + '\n'
+ + ' var __line = 1' + '\n'
+ + ' , __lines = ' + JSON.stringify(includeObj.template) + '\n'
+ + ' , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n'
+ + ' try {' + '\n'
+ + includeObj.source
+ + ' } catch (e) {' + '\n'
+ + ' rethrow(e, __lines, __filename, __line);' + '\n'
+ + ' }' + '\n'
+ + ' ; }).call(this)' + '\n';
+ }else{
+ includeSrc = ' ; (function(){' + '\n' + includeObj.source +
+ ' ; }).call(this)' + '\n';
+ }
self.source += includeSrc;
self.dependencies.push(exports.resolveInclude(include[1],
includeOpts.filename));
@@ -539,19 +594,17 @@ Template.prototype = {
});
}
- }
+ },
-, parseTemplateText: function () {
- var str = this.templateText
- , pat = this.regex
- , result = pat.exec(str)
- , arr = []
- , firstPos
- , lastPos;
+ parseTemplateText: function () {
+ var str = this.templateText;
+ var pat = this.regex;
+ var result = pat.exec(str);
+ var arr = [];
+ var firstPos;
while (result) {
firstPos = result.index;
- lastPos = pat.lastIndex;
if (firstPos !== 0) {
arr.push(str.substring(0, firstPos));
@@ -568,20 +621,25 @@ Template.prototype = {
}
return arr;
- }
+ },
-, scanLine: function (line) {
- var self = this
- , d = this.opts.delimiter
- , newLineCount = 0;
+ scanLine: function (line) {
+ var self = this;
+ var d = this.opts.delimiter;
+ var newLineCount = 0;
function _addOutput() {
if (self.truncate) {
- line = line.replace('\n', '');
+ // Only replace single leading linebreak in the line after
+ // -%> tag -- this is the single, trailing linebreak
+ // after the tag that the truncation mode replaces
+ // Handle Win / Unix / old Mac linebreaks -- do the \r\n
+ // combo first in the regex-or
+ line = line.replace(/^(?:\r\n|\r|\n)/, '');
self.truncate = false;
}
else if (self.opts.rmWhitespace) {
- // Gotta me more careful here.
+ // Gotta be more careful here.
// .replace(/^(\s*)\n/, '$1') might be more appropriate here but as
// rmWhitespace already removes trailing spaces anyway so meh.
line = line.replace(/^\n/, '');
@@ -623,6 +681,10 @@ Template.prototype = {
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n';
break;
+ case d + d + '>':
+ this.mode = Template.modes.LITERAL;
+ this.source += ' ; __append("' + line.replace(d + d + '>', d + '>') + '")' + '\n';
+ break;
case d + '>':
case '-' + d + '>':
case '_' + d + '>':
@@ -682,6 +744,20 @@ Template.prototype = {
}
};
+/**
+ * Escape characters reserved in XML.
+ *
+ * This is simply an export of {@link module:utils.escapeXML}.
+ *
+ * If `markup` is `undefined` or `null`, the empty string is returned.
+ *
+ * @param {String} markup Input string
+ * @return {String} Escaped string
+ * @public
+ * @func
+ * */
+exports.escapeXML = utils.escapeXML;
+
/**
* Express.js support.
*
@@ -696,14 +772,14 @@ exports.__express = exports.renderFile;
// Add require support
/* istanbul ignore else */
if (require.extensions) {
- require.extensions['.ejs'] = function (module, filename) {
- filename = filename || /* istanbul ignore next */ module.filename;
+ require.extensions['.ejs'] = function (module, flnm) {
+ var filename = flnm || /* istanbul ignore next */ module.filename;
var options = {
- filename: filename
- , client: true
- }
- , template = fs.readFileSync(filename).toString()
- , fn = exports.compile(template, options);
+ filename: filename,
+ client: true
+ };
+ var template = fs.readFileSync(filename).toString();
+ var fn = exports.compile(template, options);
module._compile('module.exports = ' + fn.toString() + ';', filename);
};
}
@@ -1133,6 +1209,7 @@ process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
function noop() {}
@@ -1164,7 +1241,7 @@ module.exports={
"engine",
"ejs"
],
- "version": "2.3.3",
+ "version": "2.5.1",
"author": "Matthew Eernisse (http://fleegix.org)",
"contributors": [
"Timothy Gu (https://timothygu.github.io)"
@@ -1179,14 +1256,15 @@ module.exports={
"homepage": "https://github.com/mde/ejs",
"dependencies": {},
"devDependencies": {
- "browserify": "^8.0.3",
- "istanbul": "~0.3.5",
+ "browserify": "^13.0.1",
+ "eslint": "^3.0.0",
+ "istanbul": "~0.4.3",
"jake": "^8.0.0",
- "jsdoc": "^3.3.0-beta1",
- "lru-cache": "^2.5.0",
- "mocha": "^2.1.0",
+ "jsdoc": "^3.4.0",
+ "lru-cache": "^4.0.1",
+ "mocha": "^3.0.2",
"rimraf": "^2.2.8",
- "uglify-js": "^2.4.16"
+ "uglify-js": "^2.6.2"
},
"engines": {
"node": ">=0.10.0"
@@ -1198,4 +1276,6 @@ module.exports={
"devdoc": "rimraf out && jsdoc -p -c jsdoc.json lib/* docs/jsdoc/*"
}
}
-},{}]},{},[1]);
+
+},{}]},{},[1])(1)
+});
\ No newline at end of file
diff --git a/nodejs/node_modules/ejs/ejs.min.js b/nodejs/node_modules/ejs/ejs.min.js
index 98b7d92..7796cb2 100644
--- a/nodejs/node_modules/ejs/ejs.min.js
+++ b/nodejs/node_modules/ejs/ejs.min.js
@@ -1 +1 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o|-%>|_%>)",_OPTS=["cache","filename","delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace"],_TRAILING_SEMCOL=/;\s*$/,_BOM=/^\uFEFF/;exports.cache=utils.cache;exports.localsName=_DEFAULT_LOCALS_NAME;exports.resolveInclude=function(name,filename){var path=require("path"),dirname=path.dirname,extname=path.extname,resolve=path.resolve,includePath=resolve(dirname(filename),name),ext=extname(name);if(!ext){includePath+=".ejs"}return includePath};function handleCache(options,template){var fn,path=options.filename,hasTemplate=arguments.length>1;if(options.cache){if(!path){throw new Error("cache option requires a filename")}fn=exports.cache.get(path);if(fn){return fn}if(!hasTemplate){template=fs.readFileSync(path).toString().replace(_BOM,"")}}else if(!hasTemplate){if(!path){throw new Error("Internal EJS error: no file name or template "+"provided")}template=fs.readFileSync(path).toString().replace(_BOM,"")}fn=exports.compile(template,options);if(options.cache){exports.cache.set(path,fn)}return fn}function includeFile(path,options){var opts=utils.shallowCopy({},options);if(!opts.filename){throw new Error("`include` requires the 'filename' option.")}opts.filename=exports.resolveInclude(path,opts.filename);return handleCache(opts)}function includeSource(path,options){var opts=utils.shallowCopy({},options),includePath,template;if(!opts.filename){throw new Error("`include` requires the 'filename' option.")}includePath=exports.resolveInclude(path,opts.filename);template=fs.readFileSync(includePath).toString().replace(_BOM,"");opts.filename=includePath;var templ=new Template(template,opts);templ.generateSource();return templ.source}function rethrow(err,str,filename,lineno){var lines=str.split("\n"),start=Math.max(lineno-3,0),end=Math.min(lines.length,lineno+3);var context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}function cpOptsInData(data,opts){_OPTS.forEach(function(p){if(typeof data[p]!="undefined"){opts[p]=data[p]}})}exports.compile=function compile(template,opts){var templ;if(opts&&opts.scope){if(!scopeOptionWarned){console.warn("`scope` option is deprecated and will be removed in EJS 3");scopeOptionWarned=true}if(!opts.context){opts.context=opts.scope}delete opts.scope}templ=new Template(template,opts);return templ.compile()};exports.render=function(template,data,opts){data=data||{};opts=opts||{};var fn;if(arguments.length==2){cpOptsInData(data,opts)}return handleCache(opts,template)(data)};exports.renderFile=function(){var args=Array.prototype.slice.call(arguments),path=args.shift(),cb=args.pop(),data=args.shift()||{},opts=args.pop()||{},result;opts=utils.shallowCopy({},opts);if(arguments.length==3){cpOptsInData(data,opts)}opts.filename=path;try{result=handleCache(opts)(data)}catch(err){return cb(err)}return cb(null,result)};exports.clearCache=function(){exports.cache.reset()};function Template(text,opts){opts=opts||{};var options={};this.templateText=text;this.mode=null;this.truncate=false;this.currentLine=1;this.source="";this.dependencies=[];options.client=opts.client||false;options.escapeFunction=opts.escape||utils.escapeXML;options.compileDebug=opts.compileDebug!==false;options.debug=!!opts.debug;options.filename=opts.filename;options.delimiter=opts.delimiter||exports.delimiter||_DEFAULT_DELIMITER;options._with=typeof opts._with!="undefined"?opts._with:true;options.context=opts.context;options.cache=opts.cache||false;options.rmWhitespace=opts.rmWhitespace;this.opts=options;this.regex=this.createRegex()}Template.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};Template.prototype={createRegex:function(){var str=_REGEX_STRING,delim=utils.escapeRegExpChars(this.opts.delimiter);str=str.replace(/%/g,delim);return new RegExp(str)},compile:function(){var src,fn,opts=this.opts,prepended="",appended="",escape=opts.escapeFunction;if(opts.rmWhitespace){this.templateText=this.templateText.replace(/\r/g,"").replace(/^\s+|\s+$/gm,"")}this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");if(!this.source){this.generateSource();prepended+=" var __output = [], __append = __output.push.bind(__output);"+"\n";if(opts._with!==false){prepended+=" with ("+exports.localsName+" || {}) {"+"\n";appended+=" }"+"\n"}appended+=' return __output.join("");'+"\n";this.source=prepended+this.source+appended}if(opts.compileDebug){src="var __line = 1"+"\n"+" , __lines = "+JSON.stringify(this.templateText)+"\n"+" , __filename = "+(opts.filename?JSON.stringify(opts.filename):"undefined")+";"+"\n"+"try {"+"\n"+this.source+"} catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line);"+"\n"+"}"+"\n"}else{src=this.source}if(opts.debug){console.log(src)}if(opts.client){src="escape = escape || "+escape.toString()+";"+"\n"+src;if(opts.compileDebug){src="rethrow = rethrow || "+rethrow.toString()+";"+"\n"+src}}try{fn=new Function(exports.localsName+", escape, include, rethrow",src)}catch(e){if(e instanceof SyntaxError){if(opts.filename){e.message+=" in "+opts.filename}e.message+=" while compiling ejs"}throw e}if(opts.client){fn.dependencies=this.dependencies;return fn}var returnedFn=function(data){var include=function(path,includeData){var d=utils.shallowCopy({},data);if(includeData){d=utils.shallowCopy(d,includeData)}return includeFile(path,opts)(d)};return fn.apply(opts.context,[data||{},escape,include,rethrow])};returnedFn.dependencies=this.dependencies;return returnedFn},generateSource:function(){var self=this,matches=this.parseTemplateText(),d=this.opts.delimiter;if(matches&&matches.length){matches.forEach(function(line,index){var opening,closing,include,includeOpts,includeSrc;if(line.indexOf("<"+d)===0&&line.indexOf("<"+d+d)!==0){closing=matches[index+2];if(!(closing==d+">"||closing=="-"+d+">"||closing=="_"+d+">")){throw new Error('Could not find matching close tag for "'+line+'".')}}if(include=line.match(/^\s*include\s+(\S+)/)){opening=matches[index-1];if(opening&&(opening=="<"+d||opening=="<"+d+"-"||opening=="<"+d+"_")){includeOpts=utils.shallowCopy({},self.opts);includeSrc=includeSource(include[1],includeOpts);includeSrc=" ; (function(){"+"\n"+includeSrc+" ; })()"+"\n";self.source+=includeSrc;self.dependencies.push(exports.resolveInclude(include[1],includeOpts.filename));return}}self.scanLine(line)})}},parseTemplateText:function(){var str=this.templateText,pat=this.regex,result=pat.exec(str),arr=[],firstPos,lastPos;while(result){firstPos=result.index;lastPos=pat.lastIndex;if(firstPos!==0){arr.push(str.substring(0,firstPos));str=str.slice(firstPos)}arr.push(result[0]);str=str.slice(result[0].length);result=pat.exec(str)}if(str){arr.push(str)}return arr},scanLine:function(line){var self=this,d=this.opts.delimiter,newLineCount=0;function _addOutput(){if(self.truncate){line=line.replace("\n","");self.truncate=false}else if(self.opts.rmWhitespace){line=line.replace(/^\n/,"")}if(!line){return}line=line.replace(/\\/g,"\\\\");line=line.replace(/\n/g,"\\n");line=line.replace(/\r/g,"\\r");line=line.replace(/"/g,'\\"');self.source+=' ; __append("'+line+'")'+"\n"}newLineCount=line.split("\n").length-1;switch(line){case"<"+d:case"<"+d+"_":this.mode=Template.modes.EVAL;break;case"<"+d+"=":this.mode=Template.modes.ESCAPED;break;case"<"+d+"-":this.mode=Template.modes.RAW;break;case"<"+d+"#":this.mode=Template.modes.COMMENT;break;case"<"+d+d:this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace("<"+d+d,"<"+d)+'")'+"\n";break;case d+">":case"-"+d+">":case"_"+d+">":if(this.mode==Template.modes.LITERAL){_addOutput()}this.mode=null;this.truncate=line.indexOf("-")===0||line.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case Template.modes.EVAL:case Template.modes.ESCAPED:case Template.modes.RAW:if(line.lastIndexOf("//")>line.lastIndexOf("\n")){line+="\n"}}switch(this.mode){case Template.modes.EVAL:this.source+=" ; "+line+"\n";break;case Template.modes.ESCAPED:this.source+=" ; __append(escape("+line.replace(_TRAILING_SEMCOL,"").trim()+"))"+"\n";break;case Template.modes.RAW:this.source+=" ; __append("+line.replace(_TRAILING_SEMCOL,"").trim()+")"+"\n";break;case Template.modes.COMMENT:break;case Template.modes.LITERAL:_addOutput();break}}else{_addOutput()}}if(self.opts.compileDebug&&newLineCount){this.currentLine+=newLineCount;this.source+=" ; __line = "+this.currentLine+"\n"}}};exports.__express=exports.renderFile;if(require.extensions){require.extensions[".ejs"]=function(module,filename){filename=filename||module.filename;var options={filename:filename,client:true},template=fs.readFileSync(filename).toString(),fn=exports.compile(template,options);module._compile("module.exports = "+fn.toString()+";",filename)}}exports.VERSION=_VERSION_STRING;if(typeof window!="undefined"){window.ejs=exports}},{"../package.json":6,"./utils":2,fs:3,path:4}],2:[function(require,module,exports){"use strict";var regExpChars=/[|\\{}()[\]^$+*?.]/g;exports.escapeRegExpChars=function(string){if(!string){return""}return String(string).replace(regExpChars,"\\$&")};var _ENCODE_HTML_RULES={"&":"&","<":"<",">":">",'"':""","'":"'"},_MATCH_HTML=/[&<>\'"]/g;function encode_char(c){return _ENCODE_HTML_RULES[c]||c}var escapeFuncStr="var _ENCODE_HTML_RULES = {\n"+' "&": "&"\n'+' , "<": "<"\n'+' , ">": ">"\n'+' , \'"\': """\n'+' , "\'": "'"\n'+" }\n"+" , _MATCH_HTML = /[&<>'\"]/g;\n"+"function encode_char(c) {\n"+" return _ENCODE_HTML_RULES[c] || c;\n"+"};\n";exports.escapeXML=function(markup){return markup==undefined?"":String(markup).replace(_MATCH_HTML,encode_char)};exports.escapeXML.toString=function(){return Function.prototype.toString.call(this)+";\n"+escapeFuncStr};exports.shallowCopy=function(to,from){from=from||{};for(var p in from){to[p]=from[p]}return to};exports.cache={_data:{},set:function(key,val){this._data[key]=val},get:function(key){return this._data[key]},reset:function(){this._data={}}}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i (http://fleegix.org)",contributors:["Timothy Gu (https://timothygu.github.io)"],license:"Apache-2.0",main:"./lib/ejs.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{},devDependencies:{browserify:"^8.0.3",istanbul:"~0.3.5",jake:"^8.0.0",jsdoc:"^3.3.0-beta1","lru-cache":"^2.5.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"},engines:{node:">=0.10.0"},scripts:{test:"mocha",coverage:"istanbul cover node_modules/mocha/bin/_mocha",doc:"rimraf out && jsdoc -c jsdoc.json lib/* docs/jsdoc/*",devdoc:"rimraf out && jsdoc -p -c jsdoc.json lib/* docs/jsdoc/*"}}},{}]},{},[1]);
\ No newline at end of file
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ejs=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o1;if(options.cache){if(!filename){throw new Error("cache option requires a filename")}func=exports.cache.get(filename);if(func){return func}if(!hasTemplate){template=fs.readFileSync(filename).toString().replace(_BOM,"")}}else if(!hasTemplate){if(!filename){throw new Error("Internal EJS error: no file name or template "+"provided")}template=fs.readFileSync(filename).toString().replace(_BOM,"")}func=exports.compile(template,options);if(options.cache){exports.cache.set(filename,func)}return func}function includeFile(path,options){var opts=utils.shallowCopy({},options);opts.filename=getIncludePath(path,opts);return handleCache(opts)}function includeSource(path,options){var opts=utils.shallowCopy({},options);var includePath;var template;includePath=getIncludePath(path,opts);template=fs.readFileSync(includePath).toString().replace(_BOM,"");opts.filename=includePath;var templ=new Template(template,opts);templ.generateSource();return{source:templ.source,filename:includePath,template:template}}function rethrow(err,str,filename,lineno){var lines=str.split("\n");var start=Math.max(lineno-3,0);var end=Math.min(lines.length,lineno+3);var context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}function cpOptsInData(data,opts){_OPTS.forEach(function(p){if(typeof data[p]!="undefined"){opts[p]=data[p]}})}exports.compile=function compile(template,opts){var templ;if(opts&&opts.scope){if(!scopeOptionWarned){console.warn("`scope` option is deprecated and will be removed in EJS 3");scopeOptionWarned=true}if(!opts.context){opts.context=opts.scope}delete opts.scope}templ=new Template(template,opts);return templ.compile()};exports.render=function(template,d,o){var data=d||{};var opts=o||{};if(arguments.length==2){cpOptsInData(data,opts)}return handleCache(opts,template)(data)};exports.renderFile=function(){var args=Array.prototype.slice.call(arguments);var filename=args.shift();var cb=args.pop();var data=args.shift()||{};var opts=args.pop()||{};var result;opts=utils.shallowCopy({},opts);if(arguments.length==3){if(data.settings&&data.settings["view options"]){cpOptsInData(data.settings["view options"],opts)}else{cpOptsInData(data,opts)}}opts.filename=filename;try{result=handleCache(opts)(data)}catch(err){return cb(err)}return cb(null,result)};exports.clearCache=function(){exports.cache.reset()};function Template(text,opts){opts=opts||{};var options={};this.templateText=text;this.mode=null;this.truncate=false;this.currentLine=1;this.source="";this.dependencies=[];options.client=opts.client||false;options.escapeFunction=opts.escape||utils.escapeXML;options.compileDebug=opts.compileDebug!==false;options.debug=!!opts.debug;options.filename=opts.filename;options.delimiter=opts.delimiter||exports.delimiter||_DEFAULT_DELIMITER;options.strict=opts.strict||false;options.context=opts.context;options.cache=opts.cache||false;options.rmWhitespace=opts.rmWhitespace;options.root=opts.root;options.localsName=opts.localsName||exports.localsName||_DEFAULT_LOCALS_NAME;if(options.strict){options._with=false}else{options._with=typeof opts._with!="undefined"?opts._with:true}this.opts=options;this.regex=this.createRegex()}Template.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};Template.prototype={createRegex:function(){var str=_REGEX_STRING;var delim=utils.escapeRegExpChars(this.opts.delimiter);str=str.replace(/%/g,delim);return new RegExp(str)},compile:function(){var src;var fn;var opts=this.opts;var prepended="";var appended="";var escape=opts.escapeFunction;if(!this.source){this.generateSource();prepended+=" var __output = [], __append = __output.push.bind(__output);"+"\n";if(opts._with!==false){prepended+=" with ("+opts.localsName+" || {}) {"+"\n";appended+=" }"+"\n"}appended+=' return __output.join("");'+"\n";this.source=prepended+this.source+appended}if(opts.compileDebug){src="var __line = 1"+"\n"+" , __lines = "+JSON.stringify(this.templateText)+"\n"+" , __filename = "+(opts.filename?JSON.stringify(opts.filename):"undefined")+";"+"\n"+"try {"+"\n"+this.source+"} catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line);"+"\n"+"}"+"\n"}else{src=this.source}if(opts.debug){console.log(src)}if(opts.client){src="escape = escape || "+escape.toString()+";"+"\n"+src;if(opts.compileDebug){src="rethrow = rethrow || "+rethrow.toString()+";"+"\n"+src}}if(opts.strict){src='"use strict";\n'+src}try{fn=new Function(opts.localsName+", escape, include, rethrow",src)}catch(e){if(e instanceof SyntaxError){if(opts.filename){e.message+=" in "+opts.filename}e.message+=" while compiling ejs"}throw e}if(opts.client){fn.dependencies=this.dependencies;return fn}var returnedFn=function(data){var include=function(path,includeData){var d=utils.shallowCopy({},data);if(includeData){d=utils.shallowCopy(d,includeData)}return includeFile(path,opts)(d)};return fn.apply(opts.context,[data||{},escape,include,rethrow])};returnedFn.dependencies=this.dependencies;return returnedFn},generateSource:function(){var opts=this.opts;if(opts.rmWhitespace){this.templateText=this.templateText.replace(/\r/g,"").replace(/^\s+|\s+$/gm,"")}this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var self=this;var matches=this.parseTemplateText();var d=this.opts.delimiter;if(matches&&matches.length){matches.forEach(function(line,index){var opening;var closing;var include;var includeOpts;var includeObj;var includeSrc;if(line.indexOf("<"+d)===0&&line.indexOf("<"+d+d)!==0){closing=matches[index+2];if(!(closing==d+">"||closing=="-"+d+">"||closing=="_"+d+">")){throw new Error('Could not find matching close tag for "'+line+'".')}}if(include=line.match(/^\s*include\s+(\S+)/)){opening=matches[index-1];if(opening&&(opening=="<"+d||opening=="<"+d+"-"||opening=="<"+d+"_")){includeOpts=utils.shallowCopy({},self.opts);includeObj=includeSource(include[1],includeOpts);if(self.opts.compileDebug){includeSrc=" ; (function(){"+"\n"+" var __line = 1"+"\n"+" , __lines = "+JSON.stringify(includeObj.template)+"\n"+" , __filename = "+JSON.stringify(includeObj.filename)+";"+"\n"+" try {"+"\n"+includeObj.source+" } catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line);"+"\n"+" }"+"\n"+" ; }).call(this)"+"\n"}else{includeSrc=" ; (function(){"+"\n"+includeObj.source+" ; }).call(this)"+"\n"}self.source+=includeSrc;self.dependencies.push(exports.resolveInclude(include[1],includeOpts.filename));return}}self.scanLine(line)})}},parseTemplateText:function(){var str=this.templateText;var pat=this.regex;var result=pat.exec(str);var arr=[];var firstPos;while(result){firstPos=result.index;if(firstPos!==0){arr.push(str.substring(0,firstPos));str=str.slice(firstPos)}arr.push(result[0]);str=str.slice(result[0].length);result=pat.exec(str)}if(str){arr.push(str)}return arr},scanLine:function(line){var self=this;var d=this.opts.delimiter;var newLineCount=0;function _addOutput(){if(self.truncate){line=line.replace(/^(?:\r\n|\r|\n)/,"");self.truncate=false}else if(self.opts.rmWhitespace){line=line.replace(/^\n/,"")}if(!line){return}line=line.replace(/\\/g,"\\\\");line=line.replace(/\n/g,"\\n");line=line.replace(/\r/g,"\\r");line=line.replace(/"/g,'\\"');self.source+=' ; __append("'+line+'")'+"\n"}newLineCount=line.split("\n").length-1;switch(line){case"<"+d:case"<"+d+"_":this.mode=Template.modes.EVAL;break;case"<"+d+"=":this.mode=Template.modes.ESCAPED;break;case"<"+d+"-":this.mode=Template.modes.RAW;break;case"<"+d+"#":this.mode=Template.modes.COMMENT;break;case"<"+d+d:this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace("<"+d+d,"<"+d)+'")'+"\n";break;case d+d+">":this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace(d+d+">",d+">")+'")'+"\n";break;case d+">":case"-"+d+">":case"_"+d+">":if(this.mode==Template.modes.LITERAL){_addOutput()}this.mode=null;this.truncate=line.indexOf("-")===0||line.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case Template.modes.EVAL:case Template.modes.ESCAPED:case Template.modes.RAW:if(line.lastIndexOf("//")>line.lastIndexOf("\n")){line+="\n"}}switch(this.mode){case Template.modes.EVAL:this.source+=" ; "+line+"\n";break;case Template.modes.ESCAPED:this.source+=" ; __append(escape("+line.replace(_TRAILING_SEMCOL,"").trim()+"))"+"\n";break;case Template.modes.RAW:this.source+=" ; __append("+line.replace(_TRAILING_SEMCOL,"").trim()+")"+"\n";break;case Template.modes.COMMENT:break;case Template.modes.LITERAL:_addOutput();break}}else{_addOutput()}}if(self.opts.compileDebug&&newLineCount){this.currentLine+=newLineCount;this.source+=" ; __line = "+this.currentLine+"\n"}}};exports.escapeXML=utils.escapeXML;exports.__express=exports.renderFile;if(require.extensions){require.extensions[".ejs"]=function(module,flnm){var filename=flnm||module.filename;var options={filename:filename,client:true};var template=fs.readFileSync(filename).toString();var fn=exports.compile(template,options);module._compile("module.exports = "+fn.toString()+";",filename)}}exports.VERSION=_VERSION_STRING;if(typeof window!="undefined"){window.ejs=exports}},{"../package.json":6,"./utils":2,fs:3,path:4}],2:[function(require,module,exports){"use strict";var regExpChars=/[|\\{}()[\]^$+*?.]/g;exports.escapeRegExpChars=function(string){if(!string){return""}return String(string).replace(regExpChars,"\\$&")};var _ENCODE_HTML_RULES={"&":"&","<":"<",">":">",'"':""","'":"'"},_MATCH_HTML=/[&<>\'"]/g;function encode_char(c){return _ENCODE_HTML_RULES[c]||c}var escapeFuncStr="var _ENCODE_HTML_RULES = {\n"+' "&": "&"\n'+' , "<": "<"\n'+' , ">": ">"\n'+' , \'"\': """\n'+' , "\'": "'"\n'+" }\n"+" , _MATCH_HTML = /[&<>'\"]/g;\n"+"function encode_char(c) {\n"+" return _ENCODE_HTML_RULES[c] || c;\n"+"};\n";exports.escapeXML=function(markup){return markup==undefined?"":String(markup).replace(_MATCH_HTML,encode_char)};exports.escapeXML.toString=function(){return Function.prototype.toString.call(this)+";\n"+escapeFuncStr};exports.shallowCopy=function(to,from){from=from||{};for(var p in from){to[p]=from[p]}return to};exports.cache={_data:{},set:function(key,val){this._data[key]=val},get:function(key){return this._data[key]},reset:function(){this._data={}}}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i (http://fleegix.org)",contributors:["Timothy Gu (https://timothygu.github.io)"],license:"Apache-2.0",main:"./lib/ejs.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{},devDependencies:{browserify:"^13.0.1",eslint:"^3.0.0",istanbul:"~0.4.3",jake:"^8.0.0",jsdoc:"^3.4.0","lru-cache":"^4.0.1",mocha:"^3.0.2",rimraf:"^2.2.8","uglify-js":"^2.6.2"},engines:{node:">=0.10.0"},scripts:{test:"mocha",coverage:"istanbul cover node_modules/mocha/bin/_mocha",doc:"rimraf out && jsdoc -c jsdoc.json lib/* docs/jsdoc/*",devdoc:"rimraf out && jsdoc -p -c jsdoc.json lib/* docs/jsdoc/*"}}},{}]},{},[1])(1)});
diff --git a/nodejs/node_modules/ejs/lib/ejs.js b/nodejs/node_modules/ejs/lib/ejs.js
index bbd97ba..39a7b73 100644
--- a/nodejs/node_modules/ejs/lib/ejs.js
+++ b/nodejs/node_modules/ejs/lib/ejs.js
@@ -44,18 +44,20 @@
* @public
*/
-var fs = require('fs')
- , utils = require('./utils')
- , scopeOptionWarned = false
- , _VERSION_STRING = require('../package.json').version
- , _DEFAULT_DELIMITER = '%'
- , _DEFAULT_LOCALS_NAME = 'locals'
- , _REGEX_STRING = '(<%%|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)'
- , _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context'
- , 'debug', 'compileDebug', 'client', '_with', 'rmWhitespace'
- ]
- , _TRAILING_SEMCOL = /;\s*$/
- , _BOM = /^\uFEFF/;
+var fs = require('fs');
+var path = require('path');
+var utils = require('./utils');
+
+var scopeOptionWarned = false;
+var _VERSION_STRING = require('../package.json').version;
+var _DEFAULT_DELIMITER = '%';
+var _DEFAULT_LOCALS_NAME = 'locals';
+var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
+var _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context',
+ 'debug', 'compileDebug', 'client', '_with', 'root', 'rmWhitespace',
+ 'strict', 'localsName'];
+var _TRAILING_SEMCOL = /;\s*$/;
+var _BOM = /^\uFEFF/;
/**
* EJS template function cache. This can be a LRU object from lru-cache NPM
@@ -83,24 +85,44 @@ exports.localsName = _DEFAULT_LOCALS_NAME;
* Get the path to the included file from the parent file path and the
* specified path.
*
- * @param {String} name specified path
- * @param {String} filename parent file path
+ * @param {String} name specified path
+ * @param {String} filename parent file path
+ * @param {Boolean} isDir parent file path whether is directory
* @return {String}
*/
-
-exports.resolveInclude = function(name, filename) {
- var path = require('path')
- , dirname = path.dirname
- , extname = path.extname
- , resolve = path.resolve
- , includePath = resolve(dirname(filename), name)
- , ext = extname(name);
+exports.resolveInclude = function(name, filename, isDir) {
+ var dirname = path.dirname;
+ var extname = path.extname;
+ var resolve = path.resolve;
+ var includePath = resolve(isDir ? filename : dirname(filename), name);
+ var ext = extname(name);
if (!ext) {
includePath += '.ejs';
}
return includePath;
};
+/**
+ * Get the path to the included file by Options
+ *
+ * @param {String} path specified path
+ * @param {Options} options compilation options
+ * @return {String}
+ */
+function getIncludePath(path, options){
+ var includePath;
+ if (path.charAt(0) == '/') {
+ includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
+ }
+ else {
+ if (!options.filename) {
+ throw new Error('`include` use relative path requires the \'filename\' option.');
+ }
+ includePath = exports.resolveInclude(path, options.filename);
+ }
+ return includePath;
+}
+
/**
* Get the template from a string or a file, either compiled on-the-fly or
* read from cache (if enabled), and cache the template if needed.
@@ -120,35 +142,35 @@ exports.resolveInclude = function(name, filename) {
*/
function handleCache(options, template) {
- var fn
- , path = options.filename
- , hasTemplate = arguments.length > 1;
+ var func;
+ var filename = options.filename;
+ var hasTemplate = arguments.length > 1;
if (options.cache) {
- if (!path) {
+ if (!filename) {
throw new Error('cache option requires a filename');
}
- fn = exports.cache.get(path);
- if (fn) {
- return fn;
+ func = exports.cache.get(filename);
+ if (func) {
+ return func;
}
if (!hasTemplate) {
- template = fs.readFileSync(path).toString().replace(_BOM, '');
+ template = fs.readFileSync(filename).toString().replace(_BOM, '');
}
}
else if (!hasTemplate) {
// istanbul ignore if: should not happen at all
- if (!path) {
+ if (!filename) {
throw new Error('Internal EJS error: no file name or template '
+ 'provided');
}
- template = fs.readFileSync(path).toString().replace(_BOM, '');
+ template = fs.readFileSync(filename).toString().replace(_BOM, '');
}
- fn = exports.compile(template, options);
+ func = exports.compile(template, options);
if (options.cache) {
- exports.cache.set(path, fn);
+ exports.cache.set(filename, func);
}
- return fn;
+ return func;
}
/**
@@ -166,10 +188,7 @@ function handleCache(options, template) {
function includeFile(path, options) {
var opts = utils.shallowCopy({}, options);
- if (!opts.filename) {
- throw new Error('`include` requires the \'filename\' option.');
- }
- opts.filename = exports.resolveInclude(path, opts.filename);
+ opts.filename = getIncludePath(path, opts);
return handleCache(opts);
}
@@ -179,24 +198,24 @@ function includeFile(path, options) {
* @memberof module:ejs-internal
* @param {String} path path for the specified file
* @param {Options} options compilation options
- * @return {String}
+ * @return {Object}
* @static
*/
function includeSource(path, options) {
- var opts = utils.shallowCopy({}, options)
- , includePath
- , template;
- if (!opts.filename) {
- throw new Error('`include` requires the \'filename\' option.');
- }
- includePath = exports.resolveInclude(path, opts.filename);
+ var opts = utils.shallowCopy({}, options);
+ var includePath;
+ var template;
+ includePath = getIncludePath(path,opts);
template = fs.readFileSync(includePath).toString().replace(_BOM, '');
-
opts.filename = includePath;
var templ = new Template(template, opts);
templ.generateSource();
- return templ.source;
+ return {
+ source: templ.source,
+ filename: includePath,
+ template: template
+ };
}
/**
@@ -213,10 +232,9 @@ function includeSource(path, options) {
*/
function rethrow(err, str, filename, lineno){
- var lines = str.split('\n')
- , start = Math.max(lineno - 3, 0)
- , end = Math.min(lines.length, lineno + 3);
-
+ var lines = str.split('\n');
+ var start = Math.max(lineno - 3, 0);
+ var end = Math.min(lines.length, lineno + 3);
// Error context
var context = lines.slice(start, end).map(function (line, i){
var curr = i + start + 1;
@@ -301,10 +319,9 @@ exports.compile = function compile(template, opts) {
* @public
*/
-exports.render = function (template, data, opts) {
- data = data || {};
- opts = opts || {};
- var fn;
+exports.render = function (template, d, o) {
+ var data = d || {};
+ var opts = o || {};
// No options object -- if there are optiony names
// in the data, copy them to options
@@ -329,12 +346,12 @@ exports.render = function (template, data, opts) {
*/
exports.renderFile = function () {
- var args = Array.prototype.slice.call(arguments)
- , path = args.shift()
- , cb = args.pop()
- , data = args.shift() || {}
- , opts = args.pop() || {}
- , result;
+ var args = Array.prototype.slice.call(arguments);
+ var filename = args.shift();
+ var cb = args.pop();
+ var data = args.shift() || {};
+ var opts = args.pop() || {};
+ var result;
// Don't pollute passed in opts obj with new vals
opts = utils.shallowCopy({}, opts);
@@ -342,9 +359,16 @@ exports.renderFile = function () {
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length == 3) {
- cpOptsInData(data, opts);
+ // Express 4
+ if (data.settings && data.settings['view options']) {
+ cpOptsInData(data.settings['view options'], opts);
+ }
+ // Express 3 and lower
+ else {
+ cpOptsInData(data, opts);
+ }
}
- opts.filename = path;
+ opts.filename = filename;
try {
result = handleCache(opts)(data);
@@ -379,55 +403,54 @@ function Template(text, opts) {
options.debug = !!opts.debug;
options.filename = opts.filename;
options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
- options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ options.strict = opts.strict || false;
options.context = opts.context;
options.cache = opts.cache || false;
options.rmWhitespace = opts.rmWhitespace;
+ options.root = opts.root;
+ options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
+
+ if (options.strict) {
+ options._with = false;
+ }
+ else {
+ options._with = typeof opts._with != 'undefined' ? opts._with : true;
+ }
+
this.opts = options;
this.regex = this.createRegex();
}
Template.modes = {
- EVAL: 'eval'
-, ESCAPED: 'escaped'
-, RAW: 'raw'
-, COMMENT: 'comment'
-, LITERAL: 'literal'
+ EVAL: 'eval',
+ ESCAPED: 'escaped',
+ RAW: 'raw',
+ COMMENT: 'comment',
+ LITERAL: 'literal'
};
Template.prototype = {
createRegex: function () {
- var str = _REGEX_STRING
- , delim = utils.escapeRegExpChars(this.opts.delimiter);
+ var str = _REGEX_STRING;
+ var delim = utils.escapeRegExpChars(this.opts.delimiter);
str = str.replace(/%/g, delim);
return new RegExp(str);
- }
+ },
-, compile: function () {
- var src
- , fn
- , opts = this.opts
- , prepended = ''
- , appended = ''
- , escape = opts.escapeFunction;
-
- if (opts.rmWhitespace) {
- // Have to use two separate replace here as `^` and `$` operators don't
- // work well with `\r`.
- this.templateText =
- this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
- }
-
- // Slurp spaces and tabs before <%_ and after _%>
- this.templateText =
- this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
+ compile: function () {
+ var src;
+ var fn;
+ var opts = this.opts;
+ var prepended = '';
+ var appended = '';
+ var escape = opts.escapeFunction;
if (!this.source) {
this.generateSource();
prepended += ' var __output = [], __append = __output.push.bind(__output);' + '\n';
if (opts._with !== false) {
- prepended += ' with (' + exports.localsName + ' || {}) {' + '\n';
+ prepended += ' with (' + opts.localsName + ' || {}) {' + '\n';
appended += ' }' + '\n';
}
appended += ' return __output.join("");' + '\n';
@@ -460,8 +483,12 @@ Template.prototype = {
}
}
+ if (opts.strict) {
+ src = '"use strict";\n' + src;
+ }
+
try {
- fn = new Function(exports.localsName + ', escape, include, rethrow', src);
+ fn = new Function(opts.localsName + ', escape, include, rethrow', src);
}
catch(e) {
// istanbul ignore else
@@ -494,20 +521,34 @@ Template.prototype = {
};
returnedFn.dependencies = this.dependencies;
return returnedFn;
- }
+ },
-, generateSource: function () {
- var self = this
- , matches = this.parseTemplateText()
- , d = this.opts.delimiter;
+ generateSource: function () {
+ var opts = this.opts;
+
+ if (opts.rmWhitespace) {
+ // Have to use two separate replace here as `^` and `$` operators don't
+ // work well with `\r`.
+ this.templateText =
+ this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
+ }
+
+ // Slurp spaces and tabs before <%_ and after _%>
+ this.templateText =
+ this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
+
+ var self = this;
+ var matches = this.parseTemplateText();
+ var d = this.opts.delimiter;
if (matches && matches.length) {
matches.forEach(function (line, index) {
- var opening
- , closing
- , include
- , includeOpts
- , includeSrc;
+ var opening;
+ var closing;
+ var include;
+ var includeOpts;
+ var includeObj;
+ var includeSrc;
// If this is an opening tag, check for closing tags
// FIXME: May end up with some false positives here
// Better to store modes as k/v with '<' + delimiter as key
@@ -525,9 +566,23 @@ Template.prototype = {
// Must be in EVAL or RAW mode
if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) {
includeOpts = utils.shallowCopy({}, self.opts);
- includeSrc = includeSource(include[1], includeOpts);
- includeSrc = ' ; (function(){' + '\n' + includeSrc +
- ' ; })()' + '\n';
+ includeObj = includeSource(include[1], includeOpts);
+ if (self.opts.compileDebug) {
+ includeSrc =
+ ' ; (function(){' + '\n'
+ + ' var __line = 1' + '\n'
+ + ' , __lines = ' + JSON.stringify(includeObj.template) + '\n'
+ + ' , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n'
+ + ' try {' + '\n'
+ + includeObj.source
+ + ' } catch (e) {' + '\n'
+ + ' rethrow(e, __lines, __filename, __line);' + '\n'
+ + ' }' + '\n'
+ + ' ; }).call(this)' + '\n';
+ }else{
+ includeSrc = ' ; (function(){' + '\n' + includeObj.source +
+ ' ; }).call(this)' + '\n';
+ }
self.source += includeSrc;
self.dependencies.push(exports.resolveInclude(include[1],
includeOpts.filename));
@@ -538,19 +593,17 @@ Template.prototype = {
});
}
- }
+ },
-, parseTemplateText: function () {
- var str = this.templateText
- , pat = this.regex
- , result = pat.exec(str)
- , arr = []
- , firstPos
- , lastPos;
+ parseTemplateText: function () {
+ var str = this.templateText;
+ var pat = this.regex;
+ var result = pat.exec(str);
+ var arr = [];
+ var firstPos;
while (result) {
firstPos = result.index;
- lastPos = pat.lastIndex;
if (firstPos !== 0) {
arr.push(str.substring(0, firstPos));
@@ -567,20 +620,25 @@ Template.prototype = {
}
return arr;
- }
+ },
-, scanLine: function (line) {
- var self = this
- , d = this.opts.delimiter
- , newLineCount = 0;
+ scanLine: function (line) {
+ var self = this;
+ var d = this.opts.delimiter;
+ var newLineCount = 0;
function _addOutput() {
if (self.truncate) {
- line = line.replace('\n', '');
+ // Only replace single leading linebreak in the line after
+ // -%> tag -- this is the single, trailing linebreak
+ // after the tag that the truncation mode replaces
+ // Handle Win / Unix / old Mac linebreaks -- do the \r\n
+ // combo first in the regex-or
+ line = line.replace(/^(?:\r\n|\r|\n)/, '');
self.truncate = false;
}
else if (self.opts.rmWhitespace) {
- // Gotta me more careful here.
+ // Gotta be more careful here.
// .replace(/^(\s*)\n/, '$1') might be more appropriate here but as
// rmWhitespace already removes trailing spaces anyway so meh.
line = line.replace(/^\n/, '');
@@ -622,6 +680,10 @@ Template.prototype = {
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n';
break;
+ case d + d + '>':
+ this.mode = Template.modes.LITERAL;
+ this.source += ' ; __append("' + line.replace(d + d + '>', d + '>') + '")' + '\n';
+ break;
case d + '>':
case '-' + d + '>':
case '_' + d + '>':
@@ -681,6 +743,20 @@ Template.prototype = {
}
};
+/**
+ * Escape characters reserved in XML.
+ *
+ * This is simply an export of {@link module:utils.escapeXML}.
+ *
+ * If `markup` is `undefined` or `null`, the empty string is returned.
+ *
+ * @param {String} markup Input string
+ * @return {String} Escaped string
+ * @public
+ * @func
+ * */
+exports.escapeXML = utils.escapeXML;
+
/**
* Express.js support.
*
@@ -695,14 +771,14 @@ exports.__express = exports.renderFile;
// Add require support
/* istanbul ignore else */
if (require.extensions) {
- require.extensions['.ejs'] = function (module, filename) {
- filename = filename || /* istanbul ignore next */ module.filename;
+ require.extensions['.ejs'] = function (module, flnm) {
+ var filename = flnm || /* istanbul ignore next */ module.filename;
var options = {
- filename: filename
- , client: true
- }
- , template = fs.readFileSync(filename).toString()
- , fn = exports.compile(template, options);
+ filename: filename,
+ client: true
+ };
+ var template = fs.readFileSync(filename).toString();
+ var fn = exports.compile(template, options);
module._compile('module.exports = ' + fn.toString() + ';', filename);
};
}
diff --git a/nodejs/node_modules/ejs/package.json b/nodejs/node_modules/ejs/package.json
index 23a12bb..1b4ad49 100644
--- a/nodejs/node_modules/ejs/package.json
+++ b/nodejs/node_modules/ejs/package.json
@@ -6,7 +6,7 @@
"engine",
"ejs"
],
- "version": "2.3.4",
+ "version": "2.5.2",
"author": {
"name": "Matthew Eernisse",
"email": "mde@fleegix.org",
@@ -31,14 +31,15 @@
"homepage": "https://github.com/mde/ejs",
"dependencies": {},
"devDependencies": {
- "browserify": "^8.0.3",
- "istanbul": "~0.3.5",
+ "browserify": "^13.0.1",
+ "eslint": "^3.0.0",
+ "istanbul": "~0.4.3",
"jake": "^8.0.0",
- "jsdoc": "^3.3.0-beta1",
- "lru-cache": "^2.5.0",
- "mocha": "^2.1.0",
+ "jsdoc": "^3.4.0",
+ "lru-cache": "^4.0.1",
+ "mocha": "^3.0.2",
"rimraf": "^2.2.8",
- "uglify-js": "^2.4.16"
+ "uglify-js": "^2.6.2"
},
"engines": {
"node": ">=0.10.0"
@@ -49,12 +50,12 @@
"doc": "rimraf out && jsdoc -c jsdoc.json lib/* docs/jsdoc/*",
"devdoc": "rimraf out && jsdoc -p -c jsdoc.json lib/* docs/jsdoc/*"
},
- "readme": "# EJS\n\nEmbedded JavaScript templates\n\n[](https://travis-ci.org/mde/ejs)\n[](https://david-dm.org/mde/ejs#info=devDependencies)\n\n## Installation\n\n```bash\n$ npm install ejs\n```\n\n## Features\n\n * Control flow with `<% %>`\n * Escaped output with `<%= %>`\n * Unescaped raw output with `<%- %>`\n * Trim-mode ('newline slurping') with `-%>` ending tag\n * Custom delimiters (e.g., use ' ?>' instead of '<% %>')\n * Includes\n * Client-side support\n * Static caching of intermediate JavaScript\n * Static caching of templates\n * Complies with the [Express](http://expressjs.com) view system\n\n## Example\n\n```html\n<% if (user) { %>\n
<%= user.name %>
\n<% } %>\n```\n\n## Usage\n\n```javascript\nvar template = ejs.compile(str, options);\ntemplate(data);\n// => Rendered HTML string\n\nejs.render(str, data, options);\n// => Rendered HTML string\n```\n\nYou can also use the shortcut `ejs.render(dataAndOptions);` where you pass\neverything in a single object. In that case, you'll end up with local variables\nfor all the passed options.\n\n## Options\n\n - `cache` Compiled functions are cached, requires `filename`\n - `filename` Used by `cache` to key caches, and for includes\n - `context` Function execution context\n - `compileDebug` When `false` no debug instrumentation is compiled\n - `client` Returns standalone compiled function\n - `delimiter` Character to use with angle brackets for open/close\n - `debug` Output generated function body\n - `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object.\n - `rmWhitespace` Remove all safe-to-remove whitespace, including leading\n and trailing whitespace. It also enables a safer version of `-%>` line\n slurping for all scriptlet tags (it does not strip new lines of tags in\n the middle of a line).\n\n## Tags\n\n - `<%` 'Scriptlet' tag, for control-flow, no output\n - `<%=` Outputs the value into the template (HTML escaped)\n - `<%-` Outputs the unescaped value into the template\n - `<%#` Comment tag, no execution, no output\n - `<%%` Outputs a literal '<%'\n - `%>` Plain ending tag\n - `-%>` Trim-mode ('newline slurp') tag, trims following newline\n\n## Includes\n\nIncludes either have to be an absolute path, or, if not, are assumed as\nrelative to the template with the `include` call. (This requires the\n`filename` option.) For example if you are including `./views/user/show.ejs`\nfrom `./views/users.ejs` you would use `<%- include('user/show') %>`.\n\nYou'll likely want to use the raw output tag (`<%-`) with your include to avoid\ndouble-escaping the HTML output.\n\n```html\n
\n```\n\nIncludes are inserted at runtime, so you can use variables for the path in the\n`include` call (for example `<%- include(somePath) %>`). Variables in your\ntop-level data object are available to all your includes, but local variables\nneed to be passed down.\n\nNOTE: Include preprocessor directives (`<% include user/show %>`) are\nstill supported.\n\n## Custom delimiters\n\nCustom delimiters can be applied on a per-template basis, or globally:\n\n```javascript\nvar ejs = require('ejs'),\n users = ['geddy', 'neil', 'alex'];\n\n// Just one template\nejs.render('= users.join(\" | \"); ?>', {users: users}, {delimiter: '?'});\n// => 'geddy | neil | alex'\n\n// Or globally\nejs.delimiter = '$';\nejs.render('<$= users.join(\" | \"); $>', {users: users});\n// => 'geddy | neil | alex'\n```\n\n## Caching\n\nEJS ships with a basic in-process cache for caching the intermediate JavaScript\nfunctions used to render templates. It's easy to plug in LRU caching using\nNode's `lru-cache` library:\n\n```javascript\nvar ejs = require('ejs')\n , LRU = require('lru-cache');\nejs.cache = LRU(100); // LRU cache with 100-item limit\n```\n\nIf you want to clear the EJS cache, call `ejs.clearCache`. If you're using the\nLRU cache and need a different limit, simple reset `ejs.cache` to a new instance\nof the LRU.\n\n## Layouts\n\nEJS does not specifically support blocks, but layouts can be implemented by\nincluding headers and footers, like so:\n\n\n```html\n<%- include('header') -%>\n
\n Title\n
\n
\n My page\n
\n<%- include('footer') -%>\n```\n\n## Client-side support\n\nGo to the [Latest Release](https://github.com/mde/ejs/releases/latest), download\n`./ejs.js` or `./ejs.min.js`.\n\nInclude one of these on your page, and `ejs.render(str)`.\n\n## Related projects\n\nThere are a number of implementations of EJS:\n\n * TJ's implementation, the v1 of this library: https://github.com/tj/ejs\n * Jupiter Consulting's EJS: http://www.embeddedjs.com/\n * EJS Embedded JavaScript Framework on Google Code: https://code.google.com/p/embeddedjavascript/\n * Sam Stephenson's Ruby implementation: https://rubygems.org/gems/ejs\n * Erubis, an ERB implementation which also runs JavaScript: http://www.kuwata-lab.com/erubis/users-guide.04.html#lang-javascript\n\n## License\n\nLicensed under the Apache License, Version 2.0\n()\n\n- - -\nEJS Embedded JavaScript templates copyright 2112\nmde@fleegix.org.\n\n\n",
+ "readme": "# EJS\n\nEmbedded JavaScript templates\n\n[](https://travis-ci.org/mde/ejs)\n[](https://david-dm.org/mde/ejs?type=dev)\n\n## Installation\n\n```bash\n$ npm install ejs\n```\n\n## Features\n\n * Control flow with `<% %>`\n * Escaped output with `<%= %>` (escape function configurable)\n * Unescaped raw output with `<%- %>`\n * Newline-trim mode ('newline slurping') with `-%>` ending tag\n * Whitespace-trim mode (slurp all whitespace) for control flow with `<%_ _%>`\n * Custom delimiters (e.g., use ` ?>` instead of `<% %>`)\n * Includes\n * Client-side support\n * Static caching of intermediate JavaScript\n * Static caching of templates\n * Complies with the [Express](http://expressjs.com) view system\n\n## Example\n\n```html\n<% if (user) { %>\n
<%= user.name %>
\n<% } %>\n```\n\nTry EJS online at: https://ionicabizau.github.io/ejs-playground/.\n\n## Usage\n\n```javascript\nvar template = ejs.compile(str, options);\ntemplate(data);\n// => Rendered HTML string\n\nejs.render(str, data, options);\n// => Rendered HTML string\n\nejs.renderFile(filename, data, options, function(err, str){\n // str => Rendered HTML string\n});\n```\n\nIt is also possible to use `ejs.render(dataAndOptions);` where you pass\neverything in a single object. In that case, you'll end up with local variables\nfor all the passed options. However, be aware that your code could break if we\nadd an option with the same name as one of your data object's properties.\nTherefore, we do not recommend using this shortcut.\n\n## Options\n\n - `cache` Compiled functions are cached, requires `filename`\n - `filename` The name of the file being rendered. Not required if you\n are using `renderFile()`. Used by `cache` to key caches, and for includes.\n - `root` Set project root for includes with an absolute path (/file.ejs).\n - `context` Function execution context\n - `compileDebug` When `false` no debug instrumentation is compiled\n - `client` When `true`, compiles a function that can be rendered\n in the browser without needing to load the EJS Runtime\n ([ejs.min.js](https://github.com/mde/ejs/releases/latest)).\n - `delimiter` Character to use with angle brackets for open/close\n - `debug` Output generated function body\n - `strict` When set to `true`, generated function is in strict mode\n - `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object. Set to `false` in strict mode.\n - `localsName` Name to use for the object storing local variables when not using `with` Defaults to `locals`\n - `rmWhitespace` Remove all safe-to-remove whitespace, including leading\n and trailing whitespace. It also enables a safer version of `-%>` line\n slurping for all scriptlet tags (it does not strip new lines of tags in\n the middle of a line).\n - `escape` The escaping function used with `<%=` construct. It is\n used in rendering and is `.toString()`ed in the generation of client functions. (By default escapes XML).\n\nThis project uses [JSDoc](http://usejsdoc.org/). For the full public API\ndocumentation, clone the repository and run `npm run doc`. This will run JSDoc\nwith the proper options and output the documentation to `out/`. If you want\nthe both the public & private API docs, run `npm run devdoc` instead.\n\n## Tags\n\n - `<%` 'Scriptlet' tag, for control-flow, no output\n - `<%_` 'Whitespace Slurping' Scriptlet tag, strips all whitespace before it\n - `<%=` Outputs the value into the template (escaped)\n - `<%-` Outputs the unescaped value into the template\n - `<%#` Comment tag, no execution, no output\n - `<%%` Outputs a literal '<%'\n - `%%>` Outputs a literal '%>'\n - `%>` Plain ending tag\n - `-%>` Trim-mode ('newline slurp') tag, trims following newline\n - `_%>` 'Whitespace Slurping' ending tag, removes all whitespace after it\n\nFor the full syntax documentation, please see [docs/syntax.md](https://github.com/mde/ejs/blob/master/docs/syntax.md).\n\n## Includes\n\nIncludes either have to be an absolute path, or, if not, are assumed as\nrelative to the template with the `include` call. For example if you are\nincluding `./views/user/show.ejs` from `./views/users.ejs` you would\nuse `<%- include('user/show') %>`.\n\nYou must specify the `filename` option for the template with the `include`\ncall unless you are using `renderFile()`.\n\nYou'll likely want to use the raw output tag (`<%-`) with your include to avoid\ndouble-escaping the HTML output.\n\n```html\n
\n```\n\nIncludes are inserted at runtime, so you can use variables for the path in the\n`include` call (for example `<%- include(somePath) %>`). Variables in your\ntop-level data object are available to all your includes, but local variables\nneed to be passed down.\n\nNOTE: Include preprocessor directives (`<% include user/show %>`) are\nstill supported.\n\n## Custom delimiters\n\nCustom delimiters can be applied on a per-template basis, or globally:\n\n```javascript\nvar ejs = require('ejs'),\n users = ['geddy', 'neil', 'alex'];\n\n// Just one template\nejs.render('= users.join(\" | \"); ?>', {users: users}, {delimiter: '?'});\n// => 'geddy | neil | alex'\n\n// Or globally\nejs.delimiter = '$';\nejs.render('<$= users.join(\" | \"); $>', {users: users});\n// => 'geddy | neil | alex'\n```\n\n## Caching\n\nEJS ships with a basic in-process cache for caching the intermediate JavaScript\nfunctions used to render templates. It's easy to plug in LRU caching using\nNode's `lru-cache` library:\n\n```javascript\nvar ejs = require('ejs')\n , LRU = require('lru-cache');\nejs.cache = LRU(100); // LRU cache with 100-item limit\n```\n\nIf you want to clear the EJS cache, call `ejs.clearCache`. If you're using the\nLRU cache and need a different limit, simple reset `ejs.cache` to a new instance\nof the LRU.\n\n## Layouts\n\nEJS does not specifically support blocks, but layouts can be implemented by\nincluding headers and footers, like so:\n\n\n```html\n<%- include('header') -%>\n
\n Title\n
\n
\n My page\n
\n<%- include('footer') -%>\n```\n\n## Client-side support\n\nGo to the [Latest Release](https://github.com/mde/ejs/releases/latest), download\n`./ejs.js` or `./ejs.min.js`. Alternately, you can compile it yourself by cloning\nthe repository and running `jake build` (or `$(npm bin)/jake build` if jake is\nnot installed globally).\n\nInclude one of these files on your page, and `ejs` should be available globally.\n\n### Example\n\n```html\n\n\n\n```\n\n### Caveats\n\nMost of EJS will work as expected; however, there are a few things to note:\n\n1. Obviously, since you do not have access to the filesystem, `ejs.renderFile()` won't work.\n2. For the same reason, `include`s do not work unless you use an `IncludeCallback`. Here is an example:\n ```javascript\n var str = \"Hello <%= include('file', {person: 'John'}); %>\",\n fn = ejs.compile(str, {client: true});\n\n fn(data, null, function(path, d){ // IncludeCallback\n // path -> 'file'\n // d -> {person: 'John'}\n // Put your code here\n // Return the contents of file as a string\n }); // returns rendered string\n ```\n\n## Related projects\n\nThere are a number of implementations of EJS:\n\n * TJ's implementation, the v1 of this library: https://github.com/tj/ejs\n * Jupiter Consulting's EJS: http://www.embeddedjs.com/\n * EJS Embedded JavaScript Framework on Google Code: https://code.google.com/p/embeddedjavascript/\n * Sam Stephenson's Ruby implementation: https://rubygems.org/gems/ejs\n * Erubis, an ERB implementation which also runs JavaScript: http://www.kuwata-lab.com/erubis/users-guide.04.html#lang-javascript\n\n## License\n\nLicensed under the Apache License, Version 2.0\n()\n\n- - -\nEJS Embedded JavaScript templates copyright 2112\nmde@fleegix.org.\n",
"readmeFilename": "README.md",
- "_id": "ejs@2.3.4",
+ "_id": "ejs@2.5.2",
"dist": {
- "shasum": "f23675dcdcda36d7337cfada2e2303d01e596238"
+ "shasum": "2b57fbf297934f308997427b5f8f27ce0f9bf082"
},
- "_from": "ejs@>= 0.0.1",
- "_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.3.4.tgz"
+ "_from": "ejs@2.5.2",
+ "_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.2.tgz"
}
diff --git a/nodejs/node_modules/ejs/test/ejs.js b/nodejs/node_modules/ejs/test/ejs.js
index 0759b10..a2d593d 100644
--- a/nodejs/node_modules/ejs/test/ejs.js
+++ b/nodejs/node_modules/ejs/test/ejs.js
@@ -135,6 +135,36 @@ suite('ejs.compile(str, options)', function () {
// There could be a `rethrow` in the function declaration
assert((fn.toString().match(/rethrow/g) || []).length <= 1);
});
+
+ test('support custom escape function', function () {
+ var customEscape
+ , fn;
+ customEscape = function customEscape(str) {
+ return !str ? '' : str.toUpperCase();
+ };
+ fn = ejs.compile('HELLO <%= name %>', {escape: customEscape});
+ assert.equal(fn({name: 'world'}), 'HELLO WORLD');
+ });
+
+ test('support custom escape function in client mode', function () {
+ var customEscape
+ , fn
+ , str;
+ customEscape = function customEscape(str) {
+ return !str ? '' : str.toUpperCase();
+ };
+ fn = ejs.compile('HELLO <%= name %>', {escape: customEscape, client: true});
+ str = fn.toString();
+ if (!process.env.running_under_istanbul) {
+ eval('var preFn = ' + str);
+ assert.equal(preFn({name: 'world'}), 'HELLO WORLD');
+ }
+ });
+
+ test('strict mode works', function () {
+ assert.equal(ejs.render(fixture('strict.ejs'), {}, {strict: true}), 'true');
+ });
+
});
suite('ejs.render(str, data, opts)', function () {
@@ -460,6 +490,18 @@ suite('<%=', function () {
assert.equal(ejs.render('<%= name %>', {name: '&foo_bar;'}),
'&foo_bar;');
});
+
+ test('should accept custom function', function() {
+
+ var customEscape = function customEscape(str) {
+ return !str ? '' : str.toUpperCase();
+ };
+
+ assert.equal(
+ ejs.render('<%= name %>', {name: 'The Jones\'s'}, {escape: customEscape}),
+ 'THE JONES\'S'
+ );
+ });
});
suite('<%-', function () {
@@ -511,6 +553,34 @@ suite('-%>', function () {
}
throw new Error('Expected ReferenceError');
});
+
+ test('works with unix style', function () {
+ var content = "
";
+ var fn;
+ fn = ejs.compile(content);
+ assert.equal(fn({users: users}),
+ expectedResult);
+ });
});
suite('<%%', function () {
@@ -525,6 +595,15 @@ suite('<%%', function () {
});
});
+suite('%%>', function () {
+ test('produce literal', function () {
+ assert.equal(ejs.render('%%>'),
+ '%>');
+ assert.equal(ejs.render(' >', {}, {delimiter: ' '}),
+ ' >');
+ });
+});
+
suite('<%_ and _%>', function () {
test('slurps spaces and tabs', function () {
assert.equal(ejs.render(fixture('space-and-tab-slurp.ejs'), {users: users}),
@@ -661,6 +740,14 @@ suite('include()', function () {
fixture('include.html'));
});
+ test('include ejs with set root path', function () {
+ var file = 'test/fixtures/include-root.ejs',
+ viewsPath = path.join(__dirname, 'fixtures');
+ assert.equal(ejs.render(fixture('include-root.ejs'), {pets: users}, {filename: file, delimiter: '@',root:viewsPath}),
+ fixture('include.html'));
+
+ });
+
test('work when nested', function () {
var file = 'test/fixtures/menu.ejs';
assert.equal(ejs.render(fixture('menu.ejs'), {pets: users}, {filename: file}),
@@ -818,6 +905,15 @@ suite('preprocessor include', function () {
assert.equal(out, expected);
});
+ test('whitespace slurp and rmWhitespace work', function() {
+ var file = 'test/fixtures/include_preprocessor_line_slurp.ejs'
+ , template = fixture('include_preprocessor_line_slurp.ejs')
+ , expected = fixture('include_preprocessor_line_slurp.html')
+ , options = {rmWhitespace: true, filename: file};
+ assert.equal(ejs.render(template, options),
+ expected);
+ })
+
});
suite('comments', function () {
diff --git a/nodejs/node_modules/ejs/test/fixtures/include-root.ejs b/nodejs/node_modules/ejs/test/fixtures/include-root.ejs
new file mode 100644
index 0000000..395d6a1
--- /dev/null
+++ b/nodejs/node_modules/ejs/test/fixtures/include-root.ejs
@@ -0,0 +1 @@
+<@- include('/include'); @>
\ No newline at end of file
diff --git a/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.ejs b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.ejs
new file mode 100644
index 0000000..fd1765c
--- /dev/null
+++ b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.ejs
@@ -0,0 +1 @@
+<% include include_preprocessor_line_slurp_child %>
\ No newline at end of file
diff --git a/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.html b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.html
new file mode 100644
index 0000000..7ab7998
--- /dev/null
+++ b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp.html
@@ -0,0 +1,5 @@
+
+12
+3
+45
+
\ No newline at end of file
diff --git a/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp_child.ejs b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp_child.ejs
new file mode 100644
index 0000000..1c4a7c6
--- /dev/null
+++ b/nodejs/node_modules/ejs/test/fixtures/include_preprocessor_line_slurp_child.ejs
@@ -0,0 +1,5 @@
+
+1 <%_ if (true) { _%> 2
+ 3
+4 <%_ } _%> 5
+
\ No newline at end of file
diff --git a/nodejs/node_modules/ejs/test/fixtures/strict.ejs b/nodejs/node_modules/ejs/test/fixtures/strict.ejs
new file mode 100644
index 0000000..408ebcf
--- /dev/null
+++ b/nodejs/node_modules/ejs/test/fixtures/strict.ejs
@@ -0,0 +1,5 @@
+<%
+// Unspecified execution context should be `undefined` in strict mode
+var isReallyStrict = !((function () { return this; })())
+-%>
+<%= isReallyStrict -%>
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/.bin/mime b/nodejs/node_modules/express/node_modules/connect/node_modules/.bin/mime
new file mode 120000
index 0000000..fbb7ee0
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/.npmignore b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/.npmignore
new file mode 100644
index 0000000..e69de29
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/LICENSE b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/LICENSE
new file mode 100644
index 0000000..451fc45
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/README.md b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/README.md
new file mode 100644
index 0000000..506fbe5
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/README.md
@@ -0,0 +1,90 @@
+# mime
+
+Comprehensive MIME type mapping API based on mime-db module.
+
+## Install
+
+Install with [npm](http://github.com/isaacs/npm):
+
+ npm install mime
+
+## Contributing / Testing
+
+ npm run test
+
+## Command Line
+
+ mime [path_string]
+
+E.g.
+
+ > mime scripts/jquery.js
+ application/javascript
+
+## API - Queries
+
+### mime.lookup(path)
+Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
+
+```js
+var mime = require('mime');
+
+mime.lookup('/path/to/file.txt'); // => 'text/plain'
+mime.lookup('file.txt'); // => 'text/plain'
+mime.lookup('.TXT'); // => 'text/plain'
+mime.lookup('htm'); // => 'text/html'
+```
+
+### mime.default_type
+Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
+
+### mime.extension(type)
+Get the default extension for `type`
+
+```js
+mime.extension('text/html'); // => 'html'
+mime.extension('application/octet-stream'); // => 'bin'
+```
+
+### mime.charsets.lookup()
+
+Map mime-type to charset
+
+```js
+mime.charsets.lookup('text/plain'); // => 'UTF-8'
+```
+
+(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
+
+## API - Defining Custom Types
+
+Custom type mappings can be added on a per-project basis via the following APIs.
+
+### mime.define()
+
+Add custom mime/extension mappings
+
+```js
+mime.define({
+ 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
+ 'application/x-my-type': ['x-mt', 'x-mtt'],
+ // etc ...
+});
+
+mime.lookup('x-sft'); // => 'text/x-some-format'
+```
+
+The first entry in the extensions array is returned by `mime.extension()`. E.g.
+
+```js
+mime.extension('text/x-some-format'); // => 'x-sf'
+```
+
+### mime.load(filepath)
+
+Load mappings from an Apache ".types" format file
+
+```js
+mime.load('./my_project.types');
+```
+The .types file format is simple - See the `types` dir for examples.
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/build.js b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/build.js
new file mode 100644
index 0000000..ed5313e
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/build.js
@@ -0,0 +1,11 @@
+var db = require('mime-db');
+
+var mapByType = {};
+Object.keys(db).forEach(function(key) {
+ var extensions = db[key].extensions;
+ if (extensions) {
+ mapByType[key] = extensions;
+ }
+});
+
+console.log(JSON.stringify(mapByType));
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/test.js b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/test.js
new file mode 100644
index 0000000..58b9ba7
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/build/test.js
@@ -0,0 +1,57 @@
+/**
+ * Usage: node test.js
+ */
+
+var mime = require('../mime');
+var assert = require('assert');
+var path = require('path');
+
+//
+// Test mime lookups
+//
+
+assert.equal('text/plain', mime.lookup('text.txt')); // normal file
+assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
+assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
+assert.equal('text/plain', mime.lookup('.txt')); // nameless
+assert.equal('text/plain', mime.lookup('txt')); // extension-only
+assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
+assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
+
+//
+// Test extensions
+//
+
+assert.equal('txt', mime.extension(mime.types.text));
+assert.equal('html', mime.extension(mime.types.htm));
+assert.equal('bin', mime.extension('application/octet-stream'));
+assert.equal('bin', mime.extension('application/octet-stream '));
+assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
+assert.equal('html', mime.extension('text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html;charset=UTF-8'));
+assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
+assert.equal(undefined, mime.extension('unrecognized'));
+
+//
+// Test node.types lookups
+//
+
+assert.equal('application/font-woff', mime.lookup('file.woff'));
+assert.equal('application/octet-stream', mime.lookup('file.buffer'));
+assert.equal('audio/mp4', mime.lookup('file.m4a'));
+assert.equal('font/opentype', mime.lookup('file.otf'));
+
+//
+// Test charsets
+//
+
+assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
+assert.equal(undefined, mime.charsets.lookup(mime.types.js));
+assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
+
+console.log('\nAll tests passed');
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/cli.js b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/cli.js
new file mode 100755
index 0000000..20b1ffe
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/cli.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var mime = require('./mime.js');
+var file = process.argv[2];
+var type = mime.lookup(file);
+
+process.stdout.write(type + '\n');
+
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/mime.js b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/mime.js
new file mode 100644
index 0000000..341b6a5
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/mime.js
@@ -0,0 +1,108 @@
+var path = require('path');
+var fs = require('fs');
+
+function Mime() {
+ // Map of extension -> mime type
+ this.types = Object.create(null);
+
+ // Map of mime type -> extension
+ this.extensions = Object.create(null);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * @param map (Object) type definitions
+ */
+Mime.prototype.define = function (map) {
+ for (var type in map) {
+ var exts = map[type];
+ for (var i = 0; i < exts.length; i++) {
+ if (process.env.DEBUG_MIME && this.types[exts]) {
+ console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
+ this.types[exts] + ' to ' + type);
+ }
+
+ this.types[exts[i]] = type;
+ }
+
+ // Default extension is the first one we encounter
+ if (!this.extensions[type]) {
+ this.extensions[type] = exts[0];
+ }
+ }
+};
+
+/**
+ * Load an Apache2-style ".types" file
+ *
+ * This may be called multiple times (it's expected). Where files declare
+ * overlapping types/extensions, the last file wins.
+ *
+ * @param file (String) path of file to load.
+ */
+Mime.prototype.load = function(file) {
+ this._loading = file;
+ // Read file and split into lines
+ var map = {},
+ content = fs.readFileSync(file, 'ascii'),
+ lines = content.split(/[\r\n]+/);
+
+ lines.forEach(function(line) {
+ // Clean up whitespace/comments, and split into fields
+ var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
+ map[fields.shift()] = fields;
+ });
+
+ this.define(map);
+
+ this._loading = null;
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.lookup = function(path, fallback) {
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
+
+ return this.types[ext] || fallback || this.default_type;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.extension = function(mimeType) {
+ var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
+ return this.extensions[type];
+};
+
+// Default instance
+var mime = new Mime();
+
+// Define built-in types
+mime.define(require('./types.json'));
+
+// Default type
+mime.default_type = mime.lookup('bin');
+
+//
+// Additional API specific to the default instance
+//
+
+mime.Mime = Mime;
+
+/**
+ * Lookup a charset based on mime type.
+ */
+mime.charsets = {
+ lookup: function(mimeType, fallback) {
+ // Assume text types are utf8
+ return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
+ }
+};
+
+module.exports = mime;
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/package.json b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/package.json
new file mode 100644
index 0000000..36f12d1
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/package.json
@@ -0,0 +1,54 @@
+{
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "scripts": {
+ "prepublish": "node build/build.js > types.json",
+ "test": "node build/test.js"
+ },
+ "bin": {
+ "mime": "cli.js"
+ },
+ "contributors": [
+ {
+ "name": "Benjamin Thomas",
+ "email": "benjamin@benjaminthomas.org",
+ "url": "http://github.com/bentomas"
+ }
+ ],
+ "description": "A comprehensive library for mime-type mapping",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
+ }
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "mime-db": "^1.2.0"
+ },
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "main": "mime.js",
+ "name": "mime",
+ "repository": {
+ "url": "https://github.com/broofa/node-mime",
+ "type": "git"
+ },
+ "version": "1.3.4",
+ "readme": "# mime\n\nComprehensive MIME type mapping API based on mime-db module.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## Contributing / Testing\n\n npm run test\n\n## Command Line\n\n mime [path_string]\n\nE.g.\n\n > mime scripts/jquery.js\n application/javascript\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n```js\nvar mime = require('mime');\n\nmime.lookup('/path/to/file.txt'); // => 'text/plain'\nmime.lookup('file.txt'); // => 'text/plain'\nmime.lookup('.TXT'); // => 'text/plain'\nmime.lookup('htm'); // => 'text/html'\n```\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n```js\nmime.extension('text/html'); // => 'html'\nmime.extension('application/octet-stream'); // => 'bin'\n```\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n```js\nmime.charsets.lookup('text/plain'); // => 'UTF-8'\n```\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nCustom type mappings can be added on a per-project basis via the following APIs.\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n```js\nmime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n});\n\nmime.lookup('x-sft'); // => 'text/x-some-format'\n```\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n```js\nmime.extension('text/x-some-format'); // => 'x-sf'\n```\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n```js\nmime.load('./my_project.types');\n```\nThe .types file format is simple - See the `types` dir for examples.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/broofa/node-mime/issues"
+ },
+ "_id": "mime@1.3.4",
+ "_from": "mime@1.3.4",
+ "dist": {
+ "shasum": "db2e4d34e4dd2b6daefec43455d6e0cf0bbea83d"
+ },
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+}
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/mime/types.json b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/types.json
new file mode 100644
index 0000000..c674b1c
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/mime/types.json
@@ -0,0 +1 @@
+{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintignore b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintignore
new file mode 100644
index 0000000..1521c8b
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintignore
@@ -0,0 +1 @@
+dist
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintrc b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintrc
new file mode 100644
index 0000000..1faac27
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/.eslintrc
@@ -0,0 +1,19 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 22],
+ "consistent-return": [1],
+ "id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
+ "indent": [2, 4],
+ "max-params": [2, 9],
+ "max-statements": [2, 36],
+ "no-extra-parens": [1],
+ "no-continue": [1],
+ "no-magic-numbers": 0,
+ "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
+ "operator-linebreak": 1
+ }
+}
diff --git a/nodejs/node_modules/express/node_modules/connect/node_modules/qs/CHANGELOG.md b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..86bea76
--- /dev/null
+++ b/nodejs/node_modules/express/node_modules/connect/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,130 @@
+## **6.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
+- [Tests] remove `parallelshell` since it does not reliably report failures
+- [Tests] up to `node` `v6.3`, `v5.12`
+- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
+
+## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
+- [New] pass Buffers to the encoder/decoder directly (#161)
+- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
+- [Fix] fix compacting of nested sparse arrays (#150)
+
+## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
+- [New] allowDots option for `stringify` (#151)
+- [Fix] "sort" option should work at a depth of 3 or more (#151)
+- [Fix] Restore `dist` directory; will be removed in v7 (#148)
+
+## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
+- Revert ES6 requirement and restore support for node down to v0.8.
+
+## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
+- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
+
+## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
+- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
+
+## **5.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+
+## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
+- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
+
+## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
+- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
+- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
+
+## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
+- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
+- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
+
+## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
+- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
+
+## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
+- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
+
+## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
+- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
+- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
+- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
+- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
+- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
+- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
+- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
+- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
+- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
+- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
+
+## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
+- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #