Merge remote-tracking branch 'origin/main' into release/0.12

# Conflicts:
#	app/__test__/modules/ModuleManager.spec.ts
#	app/src/modules/ModuleManager.ts
This commit is contained in:
dswbx
2025-04-20 10:48:38 +02:00
28 changed files with 522 additions and 170 deletions
+13
View File
@@ -61,6 +61,19 @@ export class AppData extends Module<typeof dataConfigSchema> {
this.setBuilt();
}
override async onBeforeUpdate(from: AppDataConfig, to: AppDataConfig): Promise<AppDataConfig> {
// this is not 100% yet, since it could be legit
const entities = {
from: Object.keys(from.entities ?? {}),
to: Object.keys(to.entities ?? {}),
};
if (entities.from.length - entities.to.length > 1) {
throw new Error("Cannot remove more than one entity at a time");
}
return to;
}
getSchema() {
return dataConfigSchema;
}