From 3b3ee6632f78388bcb6bf8c442a2b802611f146d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 25 Apr 2014 16:33:01 -0500 Subject: [PATCH] allow method chaining --- ca-store-generator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ca-store-generator.js b/ca-store-generator.js index 085d998..4de3318 100644 --- a/ca-store-generator.js +++ b/ca-store-generator.js @@ -132,11 +132,13 @@ function dumpCerts(certs) { + " var opts = require('https').globalAgent.options;\n" + " if (!opts.ca || !opts.ca.__injected) { opts.ca = (opts.ca||[]).concat(cas); }\n" + " opts.ca.__injected = true;\n" + + " return module.exports;\n" + "};\n" + "module.exports.addFile = function (filepath) {\n" + " var opts = require('https').globalAgent.options;\n" + " opts.ca = opts.ca || [];\n" + " opts.ca.push(require('fs').readFileSync(require('path').join.apply(null, filepath.split(/\//g))));\n" + + " return module.exports;\n" + "};\n" ); console.info("Wrote '" + OUTFILE.replace(/'/g, "\\'") + "'.");