Remove console.log statements and empty catch blocks

This commit is contained in:
Torsten Dittmann
2025-05-19 00:53:49 +02:00
parent 73cf3d6394
commit b01fd526f8
31 changed files with 23 additions and 78 deletions
-2
View File
@@ -167,8 +167,6 @@
}
$: extension = allowedExtension === '*' ? mimeTypeQuery : `.${allowedExtension}`;
$: console.log(`Allowed extensions: ${allowedExtension}, MimeType: ${mimeTypeQuery}`);
</script>
<svelte:document on:visibilitychange={handleVisibilityChange} />
-1
View File
@@ -133,7 +133,6 @@ export function setStatusCodeFilter(filter: FilterData, columns: Column[]) {
tag: `**${filter.title}** is **${codeRange.label}**`,
value: statusCodeTag.value
};
console.log(codeRange);
parsedTags.update((tags) => {
tags.push(newTag);
return tags;
@@ -43,7 +43,6 @@
const content = await sdk
.forProject(page.params.region, page.params.project)
.vcs.getRepositoryContents($installation.$id, $repository.id, currentPath);
// console.log(content);
directories[0].fileCount = content.contents?.length ?? 0;
directories[0].children = content.contents
.filter((e) => e.isDirectory)
@@ -55,10 +54,9 @@
loading: false
}));
currentDir = directories[0];
// console.log(directories);
isLoading = false;
} catch (e) {
console.log(e);
} catch {
return;
}
});
@@ -85,7 +83,7 @@
const content = await sdk
.forProject(page.params.region, page.params.project)
.vcs.getRepositoryContents($installation.$id, $repository.id, path);
// console.log(content);
const fileCount = content.contents?.length ?? 0;
const contentDirectories = content.contents.filter((e) => e.isDirectory);
-5
View File
@@ -36,7 +36,6 @@ export async function processFileList(files: FileList): Promise<FileData[]> {
buffer: buffer
};
} catch (e) {
// console.log(file);
return null;
}
});
@@ -46,7 +45,6 @@ export async function processFileList(files: FileList): Promise<FileData[]> {
export async function gzipUpload(files: FileList) {
let uploadFile: File;
const tick = performance.now();
if (!files?.length) return;
// If the file is a tar.gz file, then return it as is
@@ -79,9 +77,6 @@ export async function gzipUpload(files: FileList) {
});
}
}
console.log(uploadFile);
const tock = performance.now();
console.log('Time taken to process files:', tock - tick);
return uploadFile;
}
@@ -20,7 +20,6 @@
async function addDomain() {
try {
domain = await sdk.forConsole.domains.create(page.params.organization, domainName);
console.log(domain);
invalidate(Dependencies.DOMAINS);
} catch (error) {
addNotification({
@@ -31,7 +31,6 @@
try {
domain = await sdk.forConsole.domains.updateNameservers(domain.$id);
verified = domain.nameservers === 'Appwrite';
console.log(domain);
} catch (error) {
addNotification({
type: 'error',
@@ -39,8 +38,6 @@
});
}
}
$: console.log($consoleVariables._APP_DOMAINS_NAMESERVERS);
</script>
<Fieldset legend="Verification">
@@ -12,8 +12,6 @@
export let runtimes: Models.RuntimeList;
$: selectedRuntime = runtimes?.runtimes.find((r) => r.$id === runtime);
$: console.log(runtimes);
</script>
<Card padding="s" radius="s">
@@ -15,8 +15,6 @@
checked: true
};
});
$: console.log(selectedScopes);
</script>
<Fieldset legend="Permissions">
@@ -58,9 +58,8 @@
}
return sorted;
} catch (error) {
console.log(installations);
console.log(error);
} catch {
return;
}
}
@@ -121,8 +120,6 @@
error = e.message;
}
}
$: console.log($repository);
</script>
<Modal title="Create Git deployment" bind:show onSubmit={createDeployment} bind:error>
@@ -104,8 +104,8 @@
undefined
);
await invalidate(Dependencies.FUNCTION);
} catch (error) {
console.log(error);
} catch {
return;
}
}
</script>
@@ -152,8 +152,8 @@
undefined
);
await invalidate(Dependencies.FUNCTION);
} catch (error) {
console.log(error);
} catch {
return;
}
}
</script>
@@ -99,7 +99,6 @@
: capitalize(useCase)}
checked={isChecked(useCase)}
on:change={(e) => {
console.log(useCase, e);
applyFilter('useCase', useCase, e);
}} />
</Layout.Stack>
@@ -23,8 +23,6 @@
let otherEmail = '';
async function sendTestEmail() {
const email = selected === 'self' ? $user.email : otherEmail;
console.log(email);
// TODO: replace with test method
sdk.forProject(page.params.region, page.params.project).messaging.createEmail(
ID.unique(),
@@ -59,9 +59,6 @@
});
async function sendTestMessage() {
const email = selected === 'self' ? $user.email : otherEmail;
console.log(email);
// TODO: replace with test method
sdk.forProject(page.params.region, page.params.project).messaging.createPush(
ID.unique(),
@@ -9,7 +9,6 @@
export let variables: Partial<Models.Variable>[] = [];
function deleteVariable() {
console.log(variables, currentVariable);
variables = variables.filter((v) => v.key !== currentVariable.key);
variables = [...variables];
currentVariable = null;
@@ -60,8 +60,8 @@
undefined
);
invalidate(Dependencies.SITE);
} catch (error) {
console.log(error);
} catch {
return;
}
}
</script>
@@ -125,8 +125,6 @@
};
})
: [];
$: console.log(files);
</script>
<svelte:head>
@@ -175,7 +175,6 @@
`${base}/project-${page.params.region}-${page.params.project}/sites/create-site/deploying?site=${site.$id}&deployment=${deployment.$id}`
);
} catch (e) {
console.log(e);
addNotification({
type: 'error',
message: e.message
@@ -25,11 +25,6 @@
}
});
});
// $: console.log(data.site);
$: console.log(data.deployment);
$: console.log(data.deploymentList);
// $: console.log(data.proxyRuleList);
</script>
<Container>
@@ -26,7 +26,6 @@
if (message.events.includes('sites.*.deployments.*.update')) {
invalidate(Dependencies.DEPLOYMENTS);
invalidate(Dependencies.SITE);
console.log(message);
return;
}
if (message.events.includes('sites.*.deployments.*.delete')) {
@@ -68,8 +68,8 @@
undefined
);
invalidate(Dependencies.SITE);
} catch (error) {
console.log(error);
} catch {
return;
}
}
</script>
@@ -64,9 +64,8 @@
}
return sorted;
} catch (error) {
console.log(installations);
console.log(error);
} catch {
return;
}
}
@@ -126,8 +125,6 @@
error = e.message;
}
}
$: console.log($repository);
</script>
<Modal title="Create Git deployment" bind:show onSubmit={createDeployment} bind:error>
@@ -85,8 +85,8 @@
}
return metric;
});
} catch (error) {
console.log(error);
} catch {
return;
}
}, 500);
}
@@ -106,8 +106,8 @@
undefined
);
invalidate(Dependencies.SITE);
} catch (error) {
console.log(error);
} catch {
return;
}
}
</script>
@@ -136,8 +136,8 @@
site?.specification || undefined
);
invalidate(Dependencies.SITE);
} catch (error) {
console.log(error);
} catch {
return;
}
}
@@ -9,8 +9,6 @@
// $: totalBuilds = data.buildsTotal;
// $: countBuilds = data.builds;
$: console.log(data);
</script>
<Container>
@@ -6,8 +6,6 @@
export let data;
$: total = data.deploymentsTotal;
$: count = data.deployments;
$: console.log(data);
</script>
<Container>
@@ -114,7 +114,6 @@
}
async function handleVariableSecret(event: CustomEvent<Models.Variable>) {
const variable = event.detail;
console.log(variable);
try {
await sdkUpdateVariable(variable.$id, variable.key, variable.value, variable.secret);
selectedVar = null;
@@ -15,8 +15,7 @@
await sdk.forConsole.projects.get(projectId);
const jwt = await sdk.forConsole.account.createJWT();
window.location.href = `${origin}/_appwrite/authorize?jwt=${jwt.jwt}&path=${path}`;
} catch (error) {
console.log(error);
} catch {
goto(
`${base}/auth/preview/access?origin=${origin}&path=${path}&projectId=${projectId}`
);
+1 -4
View File
@@ -4,13 +4,10 @@ import { redirect } from '@sveltejs/kit';
export const load = async ({ parent, url }) => {
const { account } = await parent();
console.log(url);
// const params = new URLSearchParams(window.location.search);
const projectId = url.searchParams.get('projectId');
const origin = url.searchParams.get('origin');
const path = url.searchParams.get('path');
console.log(projectId);
if (!account) {
redirect(
303,
@@ -102,12 +102,6 @@
await register();
}
}
// async function requestAccess() {
// //TODO: Implement request access
// }
$: console.log(data);
</script>
{#if $app.themeInUse === 'dark'}