Skip to content

Commit

Permalink
update @ProtonMail web clients
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Jun 20, 2021
1 parent 4ac771c commit 3cbcd2d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
30 changes: 16 additions & 14 deletions patches/protonmail/common.patch
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ index 2bd472b..52cf521 100644
bareName: 'Calendar',
clientID: 'WebCalendar',
diff --git a/node_modules/proton-shared/lib/helpers/sentry.ts b/node_modules/proton-shared/lib/helpers/sentry.ts
index b6fd736..ff9ac8d 100644
index b75c3d7..ff9ac8d 100644
--- a/node_modules/proton-shared/lib/helpers/sentry.ts
+++ b/node_modules/proton-shared/lib/helpers/sentry.ts
@@ -1,76 +1,11 @@
@@ -1,78 +1,11 @@
import * as Sentry from '@sentry/browser';

-import { ProtonConfig } from '../interfaces';
-import { VPN_HOSTNAME } from '../constants';
+function main() {

-const isLocalhost = (host: string) => host.startsWith('localhost');
-
-const isProduction = (host: string) => host.endsWith('.protonmail.com') || host === VPN_HOSTNAME;
Expand All @@ -129,13 +129,12 @@ index b6fd736..ff9ac8d 100644
- release: isProduction(host) ? APP_VERSION : COMMIT_RELEASE,
- environment: host,
- normalizeDepth: 5,
- beforeSend(event) {
- // @ts-ignore
- if (event && 'error' in event && event.error?.stack) {
- // @ts-ignore Filter out broken ferdi errors
- if (event.error.stack.includes(/ferdi/i)) {
- return null;
- }
- beforeSend(event, hint) {
- const error = hint?.originalException;
- const stack = typeof error === 'string' ? error : error?.stack;
- // Filter out broken ferdi errors
- if (stack && stack.match(/ferdi|franz/i)) {
- return null;
- }
- return event;
- },
Expand All @@ -154,26 +153,29 @@ index b6fd736..ff9ac8d 100644
- 'NetworkError when attempting to fetch resource.',
- 'No network connection',
- 'webkitExitFullScreen', // Bug in Firefox for iOS.
- 'InactiveSession',
- /chrome-extension/,
- /moz-extension/,
- ],
- });
-
- Sentry.configureScope((scope) => {
- scope.setTag('appVersion', APP_VERSION);
- });
}

-export const traceError = (e: unknown) => {
- if (!isLocalhost(window.location.host)) {
- Sentry.captureException(e);
- }
-};
+export const traceError = (e: unknown) => console.error(e);

-export const captureMessage = (...args: Parameters<typeof Sentry.captureMessage>) => {
- if (!isLocalhost(window.location.host)) {
- Sentry.captureMessage(...args);
- }
-};
+export const captureMessage = (...args: Parameters<typeof Sentry.captureMessage>) => console.log(args[0]);

export default main;
8 changes: 4 additions & 4 deletions src/shared/proton-apps-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "",
repo: "https://github.com/ProtonMail/proton-mail.git",
commit: "1bf4bc3dc7b4702cdba62c350f73a54d5f8b23b6",
commit: "87656a8dc288b2051074fd838559f7047ec748d0",
protonPack: {
appConfig: {clientId: "WebMail"},
webpackIndexEntryItems: [
Expand Down Expand Up @@ -50,14 +50,14 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "account",
repo: "https://github.com/ProtonMail/proton-account.git",
commit: "318d7600c210568207f30c24928caf025b811d17",
commit: "9dffdf691cf8d35ca4fc894052ae5414f54dbd4b",
protonPack: {appConfig: {clientId: "WebAccount"}}
},
[PROVIDER_REPO_NAMES[2]]: {
repoRelativeDistDir: "./dist",
baseDirName: "calendar",
repo: "https://github.com/ProtonMail/proton-calendar.git",
commit: "8d4b8644be8e1cc6c6e46154ec6d78dd70feeef2",
commit: "1212a95da1fff02f0624569f21885c75f360b849",
protonPack: {
appConfig: {clientId: "WebCalendar"},
webpackIndexEntryItems: [
Expand All @@ -71,7 +71,7 @@ export const PROVIDER_REPO_MAP = {
repoRelativeDistDir: "./dist",
baseDirName: "drive",
repo: "https://github.com/ProtonMail/proton-drive.git",
commit: "4f5922664b742813270832d113094032eef4a649",
commit: "62fedc3d3bcfd83c06733b68829366296a826cc9",
protonPack: {appConfig: {clientId: "WebDrive"}},
},
} as const;
Expand Down

0 comments on commit 3cbcd2d

Please sign in to comment.