MCPcopy
hub / github.com/ThatGuySam/doesitarm / build

Method build

build-lists.js:613–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611 }
612
613 async build () {
614
615 console.log( 'Thread Pool Size', process.env.UV_THREADPOOL_SIZE )
616 console.log( 'CPU Count', os.cpus().length )
617
618 await saveYouTubeVideos()
619
620 // Pull in and layer data from all sources
621 await this.buildLists()
622
623 // Save the data to respective files as lists
624 await this.saveAppLists()
625
626 await this.saveAllAppsSummary()
627
628 // Save kind lists
629 await this.saveKinds()
630
631
632 // Add list based routes
633 for ( const listKey in this.lists ) {
634
635 this.lists[listKey].forEach( app => {
636
637 // const isVideo = (app.category === undefined)
638 const appType = getAppType( app )
639
640 if ( isVideo( app ) ) {
641 this.endpointMaps.eleventy.set(
642 getVideoEndpoint(app),
643 buildVideoPayload( app, this.allVideoAppsList, this.lists.video )
644 )
645
646 // this.endpointMaps.nuxt.set( getVideoEndpoint(app), buildVideoPayload( app, this.allVideoAppsList, this.lists.video ) )
647
648 return
649 }
650
651 // if ( isGame ) { console.log() }
652
653 // Add benchmark endpoints for apps and games
654 if ( appType === 'app' || appType === 'game' ) {
655 const payload = buildAppBenchmarkPayload( app, this.allVideoAppsList, this.lists.video )
656
657 // Only add a benchmarks endpoint if it has any videos
658 if ( payload.allVideos.length > 0 ) {
659 // this.endpointMaps.nuxt.add({
660 // route: `${getAppEndpoint(app)}/benchmarks`,
661 // payload: buildAppBenchmarkPayload( app, this.allVideoAppsList, this.lists.video )
662 // })
663
664 this.endpointMaps.nuxt.set( `${getAppEndpoint(app)}/benchmarks`, buildAppBenchmarkPayload( app, this.allVideoAppsList, this.lists.video ) )
665 }
666 }
667
668 // Add standard app endpoint
669 if ( this.shouldHaveRelatedVideos( app ) ) {
670

Callers 1

build-lists.jsFile · 0.80

Calls 15

buildListsMethod · 0.95
saveAllAppsSummaryMethod · 0.95
saveKindsMethod · 0.95
saveYouTubeVideosFunction · 0.90
getAppTypeFunction · 0.90
isVideoFunction · 0.90
getVideoEndpointFunction · 0.90
buildVideoPayloadFunction · 0.90
buildAppBenchmarkPayloadFunction · 0.90
getAppEndpointFunction · 0.90
getRelatedVideosFunction · 0.90

Tested by

no test coverage detected