fix: typecheck and prettier errors in upload controller and upgrade service
Made-with: Cursor
This commit is contained in:
+4
-2
@@ -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',
|
||||
|
||||
+5
-10
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user