From 7e33af9796c89759764b5da3d5258ef5f62dfc6b Mon Sep 17 00:00:00 2001 From: "VL.Y" <1560781+vladimiry@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:42:50 +0300 Subject: [PATCH] update @ProtonMail web clients --- patches/protonmail/common-3.patch | 34 +----- patches/protonmail/common-4.patch | 107 ++++++++++++++++++ patches/protonmail/meta.json | 20 ++-- patches/protonmail/proton-mail.patch | 8 +- .../{sentry-10.patch => sentry-12.patch} | 42 ++++++- patches/protonmail/url-3.patch | 28 +++++ patches/protonmail/url-4.patch | 75 ++++++++++++ src/electron-main/util/proton-url.ts | 9 +- .../webview/primary/provider-api/index.ts | 27 +++-- src/shared/const/proton-apps.ts | 10 +- 10 files changed, 294 insertions(+), 66 deletions(-) create mode 100644 patches/protonmail/common-4.patch rename patches/protonmail/{sentry-10.patch => sentry-12.patch} (74%) create mode 100644 patches/protonmail/url-4.patch diff --git a/patches/protonmail/common-3.patch b/patches/protonmail/common-3.patch index 9a3c9cfea..f94eb0c2a 100644 --- a/patches/protonmail/common-3.patch +++ b/patches/protonmail/common-3.patch @@ -56,9 +56,9 @@ index 9aaa78a28..f3d24b47c 100644 +{ + const platform = String(navigator.platform); + const userAgents = { -+ linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", -+ windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", -+ macos: "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" ++ linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", ++ windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", ++ macos: "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" + } as const; + uaParser.setUA( + platform.startsWith("Linux") @@ -125,31 +125,3 @@ index 36bd0c712..c2fb3681c 100644 if (doesNotSupportEarlyAccessVersion()) { return; } - -diff --git a/applications/mail/src/app/helpers/message/messageImages.ts b/applications/mail/src/app/helpers/message/messageImages.ts -index effa61709..2d54ff153 100644 ---- a/applications/mail/src/app/helpers/message/messageImages.ts -+++ b/applications/mail/src/app/helpers/message/messageImages.ts -@@ -194,7 +194,7 @@ export const replaceProxyWithOriginalURLAttributes = (message: MessageState, doc - - export const forgeImageURL = (url: string, uid: string) => { - const config = getImage(url, 0, uid); -- const prefixedUrl = `api/${config.url}`; // api/ is required to set the AUTH cookie -+ const prefixedUrl = `___ELECTRON_MAIL_PROTON_API_ENTRY_URL_PLACEHOLDER___/${config.url}`; - const urlToLoad = createUrl(prefixedUrl, config.params); - return urlToLoad.toString(); - }; - -diff --git a/packages/components/containers/contacts/helpers/senderImage.ts b/packages/components/containers/contacts/helpers/senderImage.ts -index 24578bbc0..6b38625e0 100644 ---- a/packages/components/containers/contacts/helpers/senderImage.ts -+++ b/packages/components/containers/contacts/helpers/senderImage.ts -@@ -58,7 +58,7 @@ export const getSenderImageUrl = ( - mode?: SenderImageMode - ) => { - const config = getLogo(emailAddress, size, bimiSelector, mode, UID); -- const prefixedUrl = `api/${config.url}`; // api/ is required to set the AUTH cookie -+ const prefixedUrl = `___ELECTRON_MAIL_PROTON_API_ENTRY_URL_PLACEHOLDER___/${config.url}`; - const url = createUrl(prefixedUrl, config.params); - return url.toString(); - }; diff --git a/patches/protonmail/common-4.patch b/patches/protonmail/common-4.patch new file mode 100644 index 000000000..81d3dbee9 --- /dev/null +++ b/patches/protonmail/common-4.patch @@ -0,0 +1,107 @@ +diff --git a/packages/pack/scripts/validate.sh b/packages/pack/scripts/validate.sh +index 1a2ea64..bae388c 100755 +--- a/packages/pack/scripts/validate.sh ++++ b/packages/pack/scripts/validate.sh +@@ -58,7 +58,7 @@ function main { + fi; + + if [ "$hasSourceMap" -eq 0 ]; then +- hasError=true; ++ #hasError=true; + echo "[error] no SourceMaps found inside the directory: $OUTPUT_DIR"; + fi; + +diff --git a/packages/pack/bin/protonPack.js b/packages/pack/bin/protonPack.js +index 55715b89d..c87879ad4 100755 +--- a/packages/pack/bin/protonPack.js ++++ b/packages/pack/bin/protonPack.js +@@ -81,7 +81,7 @@ addGlobalOptions(program.command('build').description('create an optimized produ + const outputPath = path.resolve('./dist'); + await commandWithLog(`rm -rf ${outputPath}`); + await commandWithLog( +- `${require.resolve('webpack-cli/bin/cli.js')} --progress --output-path=${outputPath} ${webpackArgs}`, ++ `${require.resolve('webpack-cli/bin/cli.js')} --output-path=${outputPath} ${webpackArgs}`, + { + stdio: 'inherit', + } + +diff --git a/packages/shared/lib/helpers/browser.ts b/packages/shared/lib/helpers/browser.ts +index 9aaa78a28..f3d24b47c 100644 +--- a/packages/shared/lib/helpers/browser.ts ++++ b/packages/shared/lib/helpers/browser.ts +@@ -1,6 +1,21 @@ + import UAParser from 'ua-parser-js'; + + const uaParser = new UAParser(); ++{ ++ const platform = String(navigator.platform); ++ const userAgents = { ++ linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", ++ windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", ++ macos: "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" ++ } as const; ++ uaParser.setUA( ++ platform.startsWith("Linux") ++ ? userAgents.linux ++ : platform.startsWith("Win") ++ ? userAgents.windows ++ : userAgents.macos ++ ); ++} + const ua = uaParser.getResult(); + + export const hasModulesSupport = () => { +@@ -89,20 +104,10 @@ export const requireDirectAction = () => isSafari() || isFirefox() || isEdge(); + * @links { https://mathiasbynens.github.io/rel-noopener/} + */ + export const openNewTab = (url: string) => { +- if (isIE11()) { +- const otherWindow = window.open(); +- if (!otherWindow) { +- return; +- } +- otherWindow.opener = null; +- otherWindow.location.href = url; +- return; +- } +- const anchor = document.createElement('a'); +- +- anchor.setAttribute('rel', 'noreferrer nofollow noopener'); +- anchor.setAttribute('target', '_blank'); +- anchor.href = url; +- +- return anchor.click(); ++ window.dispatchEvent( ++ new CustomEvent( ++ "electron-mail:packages/shared/lib/helpers/browser.ts:openNewTab", ++ {detail: {url}}, ++ ), ++ ); + }; + +diff --git a/packages/components/components/link/SettingsLink.tsx b/packages/components/components/link/SettingsLink.tsx +index 5081c4003..cde37c0cb 100644 +--- a/packages/components/components/link/SettingsLink.tsx ++++ b/packages/components/components/link/SettingsLink.tsx +@@ -48,7 +48,7 @@ const SettingsLink = ({ path, app, children, ...rest }: Props, ref: Ref + {children} + +diff --git a/packages/components/helpers/earlyAccessDesynchronization.ts b/packages/components/helpers/earlyAccessDesynchronization.ts +index 36bd0c712..c2fb3681c 100644 +--- a/packages/components/helpers/earlyAccessDesynchronization.ts ++++ b/packages/components/helpers/earlyAccessDesynchronization.ts +@@ -42,6 +42,7 @@ export const handleEarlyAccessDesynchronization = ({ + earlyAccessScope: Feature | undefined; + appName: APP_NAMES; + }) => { ++ return; + if (doesNotSupportEarlyAccessVersion()) { + return; + } diff --git a/patches/protonmail/meta.json b/patches/protonmail/meta.json index 1ca205242..cec869c1e 100644 --- a/patches/protonmail/meta.json +++ b/patches/protonmail/meta.json @@ -3,7 +3,7 @@ "common-3.patch", "url-3.patch", "constants-8.patch", - "sentry-10.patch", + "sentry-11.patch", "pack-api-arg-4.patch", "pack-webpack-6.patch", "session-storage-5.patch", @@ -13,9 +13,9 @@ ], "proton-account": [ "common-3.patch", - "url-3.patch", + "url-4.patch", "constants-8.patch", - "sentry-10.patch", + "sentry-12.patch", "pack-api-arg-4.patch", "pack-webpack-6.patch", "session-storage-5.patch", @@ -26,8 +26,8 @@ "proton-calendar": [ "common-3.patch", "url-3.patch", - "constants-8.patch", - "sentry-10.patch", + "constants-10.patch", + "sentry-11.patch", "pack-api-arg-4.patch", "pack-webpack-6.patch", "session-storage-5.patch", @@ -36,9 +36,9 @@ ], "proton-drive": [ "common-3.patch", - "url-3.patch", + "url-4.patch", "constants-10.patch", - "sentry-10.patch", + "sentry-12.patch", "pack-api-arg-4.patch", "pack-webpack-6.patch", "session-storage-5.patch", @@ -47,10 +47,10 @@ "proton-drive.patch" ], "proton-vpn-settings": [ - "common-3.patch", - "url-3.patch", + "common-4.patch", + "url-4.patch", "constants-10.patch", - "sentry-11.patch", + "sentry-12.patch", "pack-api-arg-4.patch", "pack-webpack-6.patch", "session-storage-5.patch", diff --git a/patches/protonmail/proton-mail.patch b/patches/protonmail/proton-mail.patch index 24cad9ff7..8ff043e33 100644 --- a/patches/protonmail/proton-mail.patch +++ b/patches/protonmail/proton-mail.patch @@ -1,17 +1,17 @@ diff --git a/packages/shared/lib/api/events.ts b/packages/shared/lib/api/events.ts -index 7c263575d..6d696e5f4 100644 +index 519a50349..819bdb911 100644 --- a/packages/shared/lib/api/events.ts +++ b/packages/shared/lib/api/events.ts @@ -6,5 +6,9 @@ export const getLatestID = () => ({ export const getEvents = (eventID: string, params?: { ConversationCounts: 1 | 0; MessageCounts: 1 | 0 }) => ({ - url: `v4/events/${eventID}`, + url: `core/v4/events/${eventID}`, method: 'get', - params, + params: { + ...params, + ConversationCounts: 1, -+ MessageCounts: 1, -+ }, ++ MessageCounts: 1 ++ } }); diff --git a/packages/components/containers/login/MinimalLoginContainer.tsx b/packages/components/containers/login/MinimalLoginContainer.tsx diff --git a/patches/protonmail/sentry-10.patch b/patches/protonmail/sentry-12.patch similarity index 74% rename from patches/protonmail/sentry-10.patch rename to patches/protonmail/sentry-12.patch index bb30e8833..8a8a8e851 100644 --- a/patches/protonmail/sentry-10.patch +++ b/patches/protonmail/sentry-12.patch @@ -1,5 +1,5 @@ diff --git a/packages/shared/lib/helpers/sentry.ts b/packages/shared/lib/helpers/sentry.ts -index fb3124ec7..6d6a3fb2a 100644 +index 731fc8566..6d6a3fb2a 100644 --- a/packages/shared/lib/helpers/sentry.ts +++ b/packages/shared/lib/helpers/sentry.ts @@ -1,14 +1,9 @@ @@ -39,7 +39,7 @@ index fb3124ec7..6d6a3fb2a 100644 const isLocalhost = (host: string) => host.startsWith('localhost'); const isProduction = (host: string) => host.endsWith('.proton.me') || host === VPN_HOSTNAME; -@@ -94,107 +74,10 @@ function main({ +@@ -94,143 +74,10 @@ function main({ sessionTracking = false, sentryConfig = getDefaultSentryConfig(config), ignore = ({ host }) => isLocalhost(host), @@ -70,7 +70,7 @@ index fb3124ec7..6d6a3fb2a 100644 - // Unfortunately Sentry does not use the custom transport for those, and thus fails to add the headers the API requires. - sendClientReports: false, - beforeSend(event, hint) { -- const error = hint?.originalException; +- const error = hint?.originalException as any; - const stack = typeof error === 'string' ? error : error?.stack; - // Filter out broken ferdi errors - if (stack && stack.match(/ferdi|franz/i)) { @@ -103,12 +103,15 @@ index fb3124ec7..6d6a3fb2a 100644 - - return event; - }, +- // Some ignoreErrors and denyUrls are taken from this gist: https://gist.github.com/Chocksy/e9b2cdd4afc2aadc7989762c4b8b495a +- // This gist is suggested in the Sentry documentation: https://docs.sentry.io/clients/javascript/tips/#decluttering-sentry - ignoreErrors: [ - // Ignore random plugins/extensions - 'top.GLOBALS', - 'canvas.contentDocument', - 'MyApp_RemoveAllHighlights', - 'atomicFindClose', +- // See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx - 'conduitPage', - // https://bugzilla.mozilla.org/show_bug.cgi?id=1678243 - 'XDR encoding failure', @@ -127,6 +130,39 @@ index fb3124ec7..6d6a3fb2a 100644 - 'ValidationError', // Validation error on user's side in Drive. - 'ChunkLoadError', // WebPack loading source code. - /ResizeObserver loop/, // Chromium bug https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded +- // See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html +- 'originalCreateNotification', +- 'http://tt.epicplay.com', +- "Can't find variable: ZiteReader", +- 'jigsaw is not defined', +- 'ComboSearch is not defined', +- 'http://loading.retry.widdit.com/', +- // Facebook borked +- 'fb_xd_fragment', +- // ISP "optimizing" proxy - `Cache-Control: no-transform` seems to reduce this. (thanks @acdha) +- // See http://stackoverflow.com/questions/4113268/how-to-stop-javascript-injection-from-vodafone-proxy +- 'bmi_SafeAddOnload', +- 'EBCallBackMessageReceived', +- // Avast extension error +- '_avast_submit', +- ], +- denyUrls: [ +- // Google Adsense +- /pagead\/js/i, +- // Facebook flakiness +- /graph\.facebook\.com/i, +- // Facebook blocked +- /connect\.facebook\.net\/en_US\/all\.js/i, +- // Woopra flakiness +- /eatdifferent\.com\.woopra-ns\.com/i, +- /static\.woopra\.com\/js\/woopra\.js/i, +- // Chrome extensions +- /extensions\//i, +- /^chrome:\/\//i, +- // Other plugins +- /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb +- /webappstoolbarba\.texthelp\.com\//i, +- /metrics\.itunes\.apple\.com\.edgesuite\.net\//i, - ], - }); - diff --git a/patches/protonmail/url-3.patch b/patches/protonmail/url-3.patch index f294f7cd6..e325e8d10 100644 --- a/patches/protonmail/url-3.patch +++ b/patches/protonmail/url-3.patch @@ -73,3 +73,31 @@ index f0b3e2e31..90995e1fc 100644 export const checkStatus = (response: Response, config: any) => { const { status } = response; + +diff --git a/applications/mail/src/app/helpers/message/messageImages.ts b/applications/mail/src/app/helpers/message/messageImages.ts +index effa61709..2d54ff153 100644 +--- a/applications/mail/src/app/helpers/message/messageImages.ts ++++ b/applications/mail/src/app/helpers/message/messageImages.ts +@@ -194,7 +194,7 @@ export const replaceProxyWithOriginalURLAttributes = (message: MessageState, doc + + export const forgeImageURL = (url: string, uid: string) => { + const config = getImage(url, 0, uid); +- const prefixedUrl = `api/${config.url}`; // api/ is required to set the AUTH cookie ++ const prefixedUrl = `___ELECTRON_MAIL_PROTON_API_ENTRY_URL_PLACEHOLDER___/${config.url}`; + const urlToLoad = createUrl(prefixedUrl, config.params); + return urlToLoad.toString(); + }; + +diff --git a/packages/components/containers/contacts/helpers/senderImage.ts b/packages/components/containers/contacts/helpers/senderImage.ts +index 24578bbc0..6b38625e0 100644 +--- a/packages/components/containers/contacts/helpers/senderImage.ts ++++ b/packages/components/containers/contacts/helpers/senderImage.ts +@@ -58,7 +58,7 @@ export const getSenderImageUrl = ( + mode?: SenderImageMode + ) => { + const config = getLogo(emailAddress, size, bimiSelector, mode, UID); +- const prefixedUrl = `api/${config.url}`; // api/ is required to set the AUTH cookie ++ const prefixedUrl = `___ELECTRON_MAIL_PROTON_API_ENTRY_URL_PLACEHOLDER___/${config.url}`; + const url = createUrl(prefixedUrl, config.params); + return url.toString(); + }; diff --git a/patches/protonmail/url-4.patch b/patches/protonmail/url-4.patch new file mode 100644 index 000000000..f294f7cd6 --- /dev/null +++ b/patches/protonmail/url-4.patch @@ -0,0 +1,75 @@ +diff --git a/packages/shared/lib/helpers/url.ts b/packages/shared/lib/helpers/url.ts +index 11cd310f6..8019c07f5 100644 +--- a/packages/shared/lib/helpers/url.ts ++++ b/packages/shared/lib/helpers/url.ts +@@ -175,48 +175,16 @@ export const getSecondLevelDomain = (hostname: string) => { + return hostname.slice(hostname.indexOf('.') + 1); + }; + +-export const getRelativeApiHostname = (hostname: string) => { +- const idx = hostname.indexOf('.'); +- const first = hostname.slice(0, idx); +- const second = hostname.slice(idx + 1); +- return `${first}-api.${second}`; +-}; +- + export const getIsDohDomain = (origin: string) => { + return DOH_DOMAINS.some((dohDomain) => origin.endsWith(dohDomain)); + }; + + export const getApiSubdomainUrl = (pathname: string) => { +- const url = new URL('/', window.location.origin); +- if (url.hostname === 'localhost' || getIsDohDomain(url.origin)) { +- url.pathname = `/api${pathname}`; +- return url; +- } +- url.hostname = getRelativeApiHostname(url.hostname); ++ const url = new URL('/', '___ELECTRON_MAIL_PROTON_API_ENTRY_URL_PLACEHOLDER___'); + url.pathname = pathname; + return url; + }; + +-export const getAppUrlFromApiUrl = (apiUrl: string, appName: APP_NAMES) => { +- const { subdomain } = APPS_CONFIGURATION[appName]; +- const url = new URL(apiUrl); +- const { hostname } = url; +- const index = hostname.indexOf('.'); +- const tail = hostname.slice(index + 1); +- url.pathname = ''; +- url.hostname = `${subdomain}.${tail}`; +- return url; +-}; +- +-export const getAppUrlRelativeToOrigin = (origin: string, appName: APP_NAMES) => { +- const { subdomain } = APPS_CONFIGURATION[appName]; +- const url = new URL(origin); +- const segments = url.host.split('.'); +- segments[0] = subdomain; +- url.hostname = segments.join('.'); +- return url; +-}; +- + let cache = ''; + export const getStaticURL = (path: string) => { + if (window.location.hostname === 'localhost' || getIsDohDomain(window.location.origin)) { + +diff --git a/packages/shared/lib/fetch/helpers.ts b/packages/shared/lib/fetch/helpers.ts +index f0b3e2e31..90995e1fc 100644 +--- a/packages/shared/lib/fetch/helpers.ts ++++ b/packages/shared/lib/fetch/helpers.ts +@@ -10,6 +10,7 @@ const appendQueryParams = (url: URL, params: { [key: string]: any }) => { + }); + }; + ++/* */ + export const createUrl = (urlString: string, params: { [key: string]: any } = {}) => { + let url: URL; + if (typeof window !== 'undefined') { +@@ -20,6 +21,7 @@ export const createUrl = (urlString: string, params: { [key: string]: any } = {} + appendQueryParams(url, params); + return url; + }; ++/* */ + + export const checkStatus = (response: Response, config: any) => { + const { status } = response; diff --git a/src/electron-main/util/proton-url.ts b/src/electron-main/util/proton-url.ts index 2afb54e3f..c9badc308 100644 --- a/src/electron-main/util/proton-url.ts +++ b/src/electron-main/util/proton-url.ts @@ -50,7 +50,12 @@ export const protonApiUrlsUtil = { // https://github.com/vladimiry/ElectronMail/issues/522#issuecomment-1156989727 patchAuthHeaders(urlPathname: string, requestHeaders: Record): boolean { - if (!`${urlPathname}/`.startsWith("/api/auth/") && !`${urlPathname}/`.startsWith("/auth/")) { + if ( + !`${urlPathname}/`.startsWith("/auth/") + && + !`${urlPathname}/`.startsWith("/api/auth/") + && + !`${urlPathname}/`.startsWith("/core/auth/")) { return false; } @@ -68,7 +73,7 @@ export const protonApiUrlsUtil = { }, patchMailApiHeaders(urlPathname: string, requestHeaders: Record): boolean { - if (!`${urlPathname}/`.startsWith("/api/mail/v4/messages/") && !`${urlPathname}/`.startsWith("/mail/v4/messages/")) { + if (!urlPathname.includes("/mail/v4/messages/")) { return false; } // eslint-disable-next-line max-len diff --git a/src/electron-preload/webview/primary/provider-api/index.ts b/src/electron-preload/webview/primary/provider-api/index.ts index 7d692d993..5e11119d3 100644 --- a/src/electron-preload/webview/primary/provider-api/index.ts +++ b/src/electron-preload/webview/primary/provider-api/index.ts @@ -19,12 +19,17 @@ const attachLoggingBeforeCall = (api: ProviderApi, logger: Logger): void => { const group = api[groupProp] as Record; for (const groupMemberProp of Object.keys(group)) { const groupMember = group[groupMemberProp]; - if (typeof groupMember === "function") { - group[groupMemberProp] = (...args: unknown[]) => { - logger.verbose(`calling provider api function: ${groupProp}.${groupMemberProp}`); - return groupMember(...args); // eslint-disable-line @typescript-eslint/no-unsafe-return - }; + if ( + typeof groupMember !== "function" + || + !Object.getOwnPropertyDescriptor(group, groupMemberProp)?.writable + ) { + continue; } + group[groupMemberProp] = (...args: unknown[]) => { + logger.verbose(`calling provider api function: ${groupProp}.${groupMemberProp}`); + return groupMember(...args); // eslint-disable-line @typescript-eslint/no-unsafe-return + }; } } }; @@ -93,13 +98,13 @@ export const initProviderApi = async (): Promise => { }), distinctUntilChanged(), ), - buildEventsApiUrlTester({entryApiUrl}) { - const re = new RegExp(`^${entryApiUrl}/v4/events/.+$`); - return (url) => re.test(url); + buildEventsApiUrlTester(/*{entryApiUrl}*/) { + const substr = "/v4/events/"; + return (url) => url.includes(substr); }, - buildMessagesCountApiUrlTester({entryApiUrl}) { - const re = new RegExp(`^${entryApiUrl}/mail/v4/messages/count$`); - return (url) => re.test(url); + buildMessagesCountApiUrlTester(/*{entryApiUrl}*/) { + const substr = "/v4/messages/count"; + return (url) => url.endsWith(substr); }, async decryptMessage(message) { const privateApi = await resolvePrivateApi(); diff --git a/src/shared/const/proton-apps.ts b/src/shared/const/proton-apps.ts index 7096f51a9..fc9239c26 100644 --- a/src/shared/const/proton-apps.ts +++ b/src/shared/const/proton-apps.ts @@ -23,7 +23,7 @@ export const PROVIDER_REPO_MAP = { basePath: "", apiSubdomain: "mail-api", repoRelativeDistDir: "./dist", - tag: "proton-mail@5.0.17.12", + tag: "proton-mail@5.0.19.5", protonPack: { webpackIndexEntryItems: [ // immediate @@ -49,14 +49,14 @@ export const PROVIDER_REPO_MAP = { basePath: "account", apiSubdomain: "account-api", repoRelativeDistDir: "./dist", - tag: "proton-account@5.0.18.4", + tag: "proton-account@5.0.22.2", protonPack: {} }, [PROVIDER_APP_NAMES[2]]: { basePath: "calendar", apiSubdomain: "calendar-api", repoRelativeDistDir: "./dist", - tag: "proton-calendar@5.0.8.1", + tag: "proton-calendar@5.0.9.4", protonPack: { webpackIndexEntryItems: [ // immediate @@ -69,14 +69,14 @@ export const PROVIDER_REPO_MAP = { basePath: "drive", apiSubdomain: "drive-api", repoRelativeDistDir: "./dist", - tag: "proton-drive@5.0.11.1", + tag: "proton-drive@5.0.12.2", protonPack: {}, }, [PROVIDER_APP_NAMES[4]]: { basePath: "account/vpn", apiSubdomain: "account-api", repoRelativeDistDir: "./dist", - tag: "proton-vpn-settings@5.0.16.0", + tag: "proton-vpn-settings@5.0.20.1", protonPack: {}, }, } as const;