| 296 | // Run all listsOptions methods |
| 297 | // and store them to this.lists |
| 298 | async buildLists () { |
| 299 | console.log( 'Build Lists started', cliOptions ) |
| 300 | |
| 301 | |
| 302 | for ( const listOptions of this.listsOptions ) { |
| 303 | |
| 304 | const methodName = `Building ${listOptions.name}` |
| 305 | console.time(methodName) |
| 306 | |
| 307 | const builtList = await listOptions.buildMethod() |
| 308 | |
| 309 | // Run the build method to get the lists |
| 310 | this.lists[listOptions.name] = new Set( builtList ) |
| 311 | |
| 312 | console.timeEnd(methodName) |
| 313 | console.log(`Finished ${listOptions.name} list with ${this.lists[listOptions.name].size} items`) |
| 314 | } |
| 315 | |
| 316 | console.log('Build Lists finished') |
| 317 | |
| 318 | return |
| 319 | } |
| 320 | |
| 321 | getListArray ( listName ) { |
| 322 | console.log(`getListArray run ${ timeRunGetListArray += 1 } times`) |