MCPcopy Index your code
hub / github.com/ThatGuySam/doesitarm / getSavedAppBundles

Method getSavedAppBundles

build-lists.js:204–225  ·  view source on GitHub ↗
( options = {} )

Source from the content-addressed store, hash-verified

202
203 bundles = []
204 async getSavedAppBundles ( options = {} ) {
205 const {
206 keepBundlesInMemory = true
207 } = options
208
209 if ( !keepBundlesInMemory ) {
210 // console.log('Getting bundles from file')
211 return await fs.readJson('./static/app-bundles.json')
212 }
213
214 // From here we get and store bundles
215
216
217 // Check if any bundles are already in memory
218 if ( this.bundles.length === 0 ) {
219 // console.log('Storing bundles to memory')
220 this.bundles = await fs.readJson('./static/app-bundles.json')
221 }
222
223 // console.log('Getting bundles from memory')
224 return this.bundles
225 }
226
227 // Load the bundles from files
228 // so that we don't have to keep them in memory

Callers 2

findAppBundleMethod · 0.95
BuildListsClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected