update models
This commit is contained in:
@@ -34,13 +34,13 @@ export class UmbPackageRepository {
|
||||
return;
|
||||
}
|
||||
|
||||
const { data } = await this.#packageSource.getRootItems();
|
||||
const { data: packages } = await this.#packageSource.getRootItems();
|
||||
|
||||
if (data) {
|
||||
store.appendItems(data.items);
|
||||
if (packages) {
|
||||
store.appendItems(packages);
|
||||
const extensions: ManifestBase[] = [];
|
||||
|
||||
data.items.forEach((p) => {
|
||||
packages.forEach((p) => {
|
||||
p.extensions?.forEach((e) => {
|
||||
// Crudely validate that the extension at least follows a basic manifest structure
|
||||
// Idea: Use `Zod` to validate the manifest
|
||||
|
||||
@@ -14,7 +14,7 @@ export class UmbPackageServerDataSource {
|
||||
* Get the root items from the server
|
||||
* @memberof UmbPackageServerDataSource
|
||||
*/
|
||||
getRootItems(): Promise<DataSourceResponse<{ items: UmbPackage[] }>> {
|
||||
getRootItems(): Promise<DataSourceResponse<UmbPackage[]>> {
|
||||
// TODO: Use real resource when available
|
||||
return tryExecuteAndNotify(
|
||||
this.host,
|
||||
|
||||
Reference in New Issue
Block a user