fix: typecheck and prettier errors in upload controller and upgrade service

Made-with: Cursor
This commit is contained in:
Félix Malfait
2026-03-04 09:38:15 +01:00
parent a1c246eb92
commit 83e1efc496
2 changed files with 9 additions and 12 deletions
@@ -99,10 +99,12 @@ export class AppRegistrationUploadController {
const manifestPath = await this.extractAndValidate(tarballPath, tempDir);
const manifestContent = await fs.readFile(manifestPath, 'utf-8');
let manifest: Record<string, unknown>;
let manifest: {
application?: { universalIdentifier?: string; displayName?: string };
};
try {
manifest = JSON.parse(manifestContent) as Record<string, unknown>;
manifest = JSON.parse(manifestContent);
} catch {
throw new ApplicationException(
'manifest.json contains invalid JSON',
@@ -40,17 +40,12 @@ export class AppUpgradeService {
this.twentyConfigService.get('APP_REGISTRY_URL');
try {
const encodedPackage = encodeURIComponent(
appRegistration.sourcePackage!,
);
const encodedPackage = encodeURIComponent(appRegistration.sourcePackage!);
const response = await fetch(
`${registryUrl}/${encodedPackage}/latest`,
{
headers: { 'User-Agent': 'Twenty-AppUpgrade' },
signal: AbortSignal.timeout(10_000),
},
);
const response = await fetch(`${registryUrl}/${encodedPackage}/latest`, {
headers: { 'User-Agent': 'Twenty-AppUpgrade' },
signal: AbortSignal.timeout(10_000),
});
if (!response.ok) {
this.logger.warn(