
* refactor: move cli to core * feat: move cli to core - use route-middleware in serve - eliminate need for `routes` dir in app * feat: use route-middleware in build * chore: update test gh action
11 lines
341 B
JavaScript
11 lines
341 B
JavaScript
/**
|
|
* Get all files from the storage given a type
|
|
* @param {string} type
|
|
* @param {Storage} storage
|
|
* @returns {Promise<string[]>}
|
|
*/
|
|
export async function getFiles(type, storage) {
|
|
return (await storage.getKeys('assets:components'))
|
|
.map((key) => key.replace('assets:components:', ''))
|
|
.filter((key) => key.includes(type))
|
|
}
|