allow method chaining

This commit is contained in:
AJ ONeal 2014-04-25 16:33:01 -05:00
parent b9cdd82719
commit 3b3ee6632f
1 changed files with 2 additions and 0 deletions

View File

@ -132,11 +132,13 @@ function dumpCerts(certs) {
+ " var opts = require('https').globalAgent.options;\n" + " var opts = require('https').globalAgent.options;\n"
+ " if (!opts.ca || !opts.ca.__injected) { opts.ca = (opts.ca||[]).concat(cas); }\n" + " if (!opts.ca || !opts.ca.__injected) { opts.ca = (opts.ca||[]).concat(cas); }\n"
+ " opts.ca.__injected = true;\n" + " opts.ca.__injected = true;\n"
+ " return module.exports;\n"
+ "};\n" + "};\n"
+ "module.exports.addFile = function (filepath) {\n" + "module.exports.addFile = function (filepath) {\n"
+ " var opts = require('https').globalAgent.options;\n" + " var opts = require('https').globalAgent.options;\n"
+ " opts.ca = opts.ca || [];\n" + " opts.ca = opts.ca || [];\n"
+ " opts.ca.push(require('fs').readFileSync(require('path').join.apply(null, filepath.split(/\//g))));\n" + " opts.ca.push(require('fs').readFileSync(require('path').join.apply(null, filepath.split(/\//g))));\n"
+ " return module.exports;\n"
+ "};\n" + "};\n"
); );
console.info("Wrote '" + OUTFILE.replace(/'/g, "\\'") + "'."); console.info("Wrote '" + OUTFILE.replace(/'/g, "\\'") + "'.");