| 162 | * After reading interface names runs the visiting api |
| 163 | */ |
| 164 | function readInterfaceNames(data, err) { |
| 165 | return new Promise(function (resolve, reject) { |
| 166 | fs.createReadStream(interfacesNamesFilePath) |
| 167 | .pipe(split()) |
| 168 | .on("data", function (line) { |
| 169 | // skip empty lines |
| 170 | if (/\S/.test(line)) { |
| 171 | interfaceNames.push(line.toString().trim()); |
| 172 | } |
| 173 | }) |
| 174 | .on("error", function (e) { |
| 175 | return reject(false); |
| 176 | }) |
| 177 | .on("close", function (e) { |
| 178 | inputDir = path.normalize(inputDir); |
| 179 | return resolve(inputDir); |
| 180 | }); |
| 181 | }); |
| 182 | } |
| 183 | |
| 184 | /* |
| 185 | * Traverses a given input directory and attempts to visit every ".js" and ".mjs" file. |