From f9e2d9926e4dff14df0f13858a9c695e2118a94e Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Wed, 26 Jul 2023 16:35:49 +0000 Subject: Improve lint setup (#400) * Use strict configuration of node/npm/pnpm * When generating a new recipe, string replace should handle all placeholders in a single file --- recipes/bard/package.json | 14 +++---- recipes/bluesky/package.json | 14 +++---- recipes/chatwoot/package.json | 16 +++---- recipes/feedly/package.json | 4 +- recipes/freshdesk/package.json | 2 +- recipes/instagram-direct-messages/package.json | 6 +-- recipes/miro/package.json | 14 +++---- recipes/mirotalk-c2c/package.json | 16 +++---- recipes/mirotalk-p2p/package.json | 16 +++---- recipes/mirotalk-sfu/package.json | 16 +++---- recipes/mirotalk-webrtc/package.json | 18 ++++---- recipes/office365-owa/package.json | 2 +- recipes/office365-owa/webview.js | 7 +++- recipes/perplexity/package.json | 14 +++---- recipes/reclaim/package.json | 14 +++---- recipes/skiff-mail/package.json | 14 +++---- recipes/skype/package.json | 2 +- recipes/tchap/package.json | 16 +++---- recipes/teamweek/package.json | 16 +++---- recipes/telegram/package.json | 2 +- recipes/telegram/webview.js | 58 +++++++++++++++----------- recipes/tixio/package.json | 24 +++++------ recipes/whatsapp/package.json | 2 +- 23 files changed, 160 insertions(+), 147 deletions(-) (limited to 'recipes') diff --git a/recipes/bard/package.json b/recipes/bard/package.json index f10ebf4..3881d1d 100644 --- a/recipes/bard/package.json +++ b/recipes/bard/package.json @@ -1,9 +1,9 @@ { - "id": "bard", - "name": "Bard", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://bard.google.com/" - } + "id": "bard", + "name": "Bard", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://bard.google.com/" + } } diff --git a/recipes/bluesky/package.json b/recipes/bluesky/package.json index dc10dc5..060e6e4 100644 --- a/recipes/bluesky/package.json +++ b/recipes/bluesky/package.json @@ -1,9 +1,9 @@ { - "id": "bluesky", - "name": "Bluesky", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://staging.bsky.app/" - } + "id": "bluesky", + "name": "Bluesky", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://staging.bsky.app/" } +} diff --git a/recipes/chatwoot/package.json b/recipes/chatwoot/package.json index 7a4af8d..3aed994 100644 --- a/recipes/chatwoot/package.json +++ b/recipes/chatwoot/package.json @@ -1,10 +1,10 @@ { - "id": "chatwoot", - "name": "Chatwoot", - "version": "1.2.0", - "license": "MIT", - "repository": "https://github.com/maximeMD/ferdi-chatwoot", - "config": { - "serviceURL": "https://app.chatwoot.com/app/login" - } + "id": "chatwoot", + "name": "Chatwoot", + "version": "1.2.1", + "license": "MIT", + "repository": "https://github.com/maximeMD/ferdi-chatwoot", + "config": { + "serviceURL": "https://app.chatwoot.com/app/login" } +} diff --git a/recipes/feedly/package.json b/recipes/feedly/package.json index 97ba54d..006c836 100644 --- a/recipes/feedly/package.json +++ b/recipes/feedly/package.json @@ -1,9 +1,9 @@ { "id": "feedly", "name": "Feedly", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "config": { - "serviceURL": "https://feedly.com" + "serviceURL": "https://feedly.com" } } diff --git a/recipes/freshdesk/package.json b/recipes/freshdesk/package.json index 924ada1..640d170 100644 --- a/recipes/freshdesk/package.json +++ b/recipes/freshdesk/package.json @@ -1,7 +1,7 @@ { "id": "freshdesk", "name": "Freshdesk", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "repository": "https://github.com/fisknils/recipe-freshdesk", "config": { diff --git a/recipes/instagram-direct-messages/package.json b/recipes/instagram-direct-messages/package.json index 20ea5b5..41aa129 100644 --- a/recipes/instagram-direct-messages/package.json +++ b/recipes/instagram-direct-messages/package.json @@ -1,10 +1,10 @@ { "id": "instagram-direct-messages", "name": "Instagram Direct Messages", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "config": { - "serviceURL": "https://www.instagram.com/direct/inbox/", - "hasNotificationSound": true + "serviceURL": "https://www.instagram.com/direct/inbox/", + "hasNotificationSound": true } } diff --git a/recipes/miro/package.json b/recipes/miro/package.json index 8c088c7..e788db2 100644 --- a/recipes/miro/package.json +++ b/recipes/miro/package.json @@ -1,9 +1,9 @@ { - "id": "miro", - "name": "Miro", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://miro.com/app/dashboard/" - } + "id": "miro", + "name": "Miro", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://miro.com/app/dashboard/" + } } diff --git a/recipes/mirotalk-c2c/package.json b/recipes/mirotalk-c2c/package.json index 309688c..f3f8a74 100644 --- a/recipes/mirotalk-c2c/package.json +++ b/recipes/mirotalk-c2c/package.json @@ -1,12 +1,12 @@ { - "id": "mirotalk-c2c", - "name": "MiroTalk C2C", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://c2c.mirotalk.com", + "id": "mirotalk-c2c", + "name": "MiroTalk C2C", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://c2c.mirotalk.com", "hasCustomUrl": true, "hasHostedOption": true, - "hasNotificationSound": true - } + "hasNotificationSound": true + } } diff --git a/recipes/mirotalk-p2p/package.json b/recipes/mirotalk-p2p/package.json index 0df1537..5fc4c8e 100644 --- a/recipes/mirotalk-p2p/package.json +++ b/recipes/mirotalk-p2p/package.json @@ -1,12 +1,12 @@ { - "id": "mirotalk-p2p", - "name": "MiroTalk P2P", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://p2p.mirotalk.com", + "id": "mirotalk-p2p", + "name": "MiroTalk P2P", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://p2p.mirotalk.com", "hasCustomUrl": true, "hasHostedOption": true, - "hasNotificationSound": true - } + "hasNotificationSound": true + } } diff --git a/recipes/mirotalk-sfu/package.json b/recipes/mirotalk-sfu/package.json index e815c4b..43238bd 100644 --- a/recipes/mirotalk-sfu/package.json +++ b/recipes/mirotalk-sfu/package.json @@ -1,12 +1,12 @@ { - "id": "mirotalk-sfu", - "name": "MiroTalk SFU", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://sfu.mirotalk.com", + "id": "mirotalk-sfu", + "name": "MiroTalk SFU", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://sfu.mirotalk.com", "hasCustomUrl": true, "hasHostedOption": true, - "hasNotificationSound": true - } + "hasNotificationSound": true + } } diff --git a/recipes/mirotalk-webrtc/package.json b/recipes/mirotalk-webrtc/package.json index afb6972..2182f0d 100644 --- a/recipes/mirotalk-webrtc/package.json +++ b/recipes/mirotalk-webrtc/package.json @@ -1,12 +1,12 @@ { - "id": "mirotalk-webrtc", - "name": "MiroTalk WebRTC", - "version": "1.2.0", - "license": "MIT", - "config": { - "serviceURL": "https://webrtc.mirotalk.com", - "hasCustomUrl": true, + "id": "mirotalk-webrtc", + "name": "MiroTalk WebRTC", + "version": "1.2.1", + "license": "MIT", + "config": { + "serviceURL": "https://webrtc.mirotalk.com", + "hasCustomUrl": true, "hasHostedOption": true, - "hasNotificationSound": true - } + "hasNotificationSound": true + } } diff --git a/recipes/office365-owa/package.json b/recipes/office365-owa/package.json index 72082ab..b714e11 100644 --- a/recipes/office365-owa/package.json +++ b/recipes/office365-owa/package.json @@ -1,7 +1,7 @@ { "id": "office365-owa", "name": "Office 365 Outlook", - "version": "1.7.0", + "version": "1.7.1", "license": "MIT", "aliases": [ "live.com", diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js index 5026249..0a0d2f3 100644 --- a/recipes/office365-owa/webview.js +++ b/recipes/office365-owa/webview.js @@ -14,7 +14,9 @@ module.exports = (Ferdium, settings) => { ); for (const child of allScreenReaders) { if (child.previousSibling) { - unreadCount += Ferdium.safeParseInt(child.previousSibling.textContent); + unreadCount += Ferdium.safeParseInt( + child.previousSibling.textContent, + ); } } } @@ -27,7 +29,8 @@ module.exports = (Ferdium, settings) => { if (/\/owa/.test(location.pathname)) { // classic app directUnreadCount = Ferdium.safeParseInt( - document.querySelectorAll("span[title*='Inbox'] + div > span")[0]?.textContent + document.querySelectorAll("span[title*='Inbox'] + div > span")[0] + ?.textContent, ); } else { // new app diff --git a/recipes/perplexity/package.json b/recipes/perplexity/package.json index 7b6eebd..89f1cc1 100644 --- a/recipes/perplexity/package.json +++ b/recipes/perplexity/package.json @@ -1,9 +1,9 @@ { - "id": "perplexity", - "name": "Perplexity AI", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://www.perplexity.ai/" - } + "id": "perplexity", + "name": "Perplexity AI", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://www.perplexity.ai/" + } } diff --git a/recipes/reclaim/package.json b/recipes/reclaim/package.json index 9fd5062..cafe0f7 100644 --- a/recipes/reclaim/package.json +++ b/recipes/reclaim/package.json @@ -1,9 +1,9 @@ { - "id": "reclaim", - "name": "Reclaim", - "version": "1.1.0", - "license": "MIT", - "config": { - "serviceURL": "https://app.reclaim.ai/" - } + "id": "reclaim", + "name": "Reclaim", + "version": "1.1.1", + "license": "MIT", + "config": { + "serviceURL": "https://app.reclaim.ai/" } +} diff --git a/recipes/skiff-mail/package.json b/recipes/skiff-mail/package.json index 02e73a9..6fde0a5 100644 --- a/recipes/skiff-mail/package.json +++ b/recipes/skiff-mail/package.json @@ -1,9 +1,9 @@ { - "id": "skiff-mail", - "name": "Skiff Mail", - "version": "1.2.0", - "license": "MIT", - "config": { - "serviceURL": "https://app.skiff.com/mail/inbox" - } + "id": "skiff-mail", + "name": "Skiff Mail", + "version": "1.2.1", + "license": "MIT", + "config": { + "serviceURL": "https://app.skiff.com/mail/inbox" + } } diff --git a/recipes/skype/package.json b/recipes/skype/package.json index 32fcef9..d056c3e 100644 --- a/recipes/skype/package.json +++ b/recipes/skype/package.json @@ -1,7 +1,7 @@ { "id": "skype", "name": "Skype", - "version": "3.6.0", + "version": "3.6.1", "license": "MIT", "config": { "serviceURL": "https://web.skype.com/", diff --git a/recipes/tchap/package.json b/recipes/tchap/package.json index cff6893..25b0200 100644 --- a/recipes/tchap/package.json +++ b/recipes/tchap/package.json @@ -1,10 +1,10 @@ { - "id": "tchap", - "name": "Tchap", - "version": "1.1.0", - "license": "MIT", - "repository": "https://github.com/Sykursen/recipe-tchap/", - "config": { - "serviceURL": "https://www.tchap.gouv.fr/" - } + "id": "tchap", + "name": "Tchap", + "version": "1.1.1", + "license": "MIT", + "repository": "https://github.com/Sykursen/recipe-tchap/", + "config": { + "serviceURL": "https://www.tchap.gouv.fr/" } +} diff --git a/recipes/teamweek/package.json b/recipes/teamweek/package.json index a9ce0f6..c5a0828 100644 --- a/recipes/teamweek/package.json +++ b/recipes/teamweek/package.json @@ -1,10 +1,10 @@ { - "id": "teamweek", - "name": "Teamweek", - "version": "1.3.0", - "license": "MIT", - "repository": "https://github.com/claudiupelmus/recipe-teamweek", - "config": { - "serviceURL": "https://app.teamweek.com/" - } + "id": "teamweek", + "name": "Teamweek", + "version": "1.3.1", + "license": "MIT", + "repository": "https://github.com/claudiupelmus/recipe-teamweek", + "config": { + "serviceURL": "https://app.teamweek.com/" + } } diff --git a/recipes/telegram/package.json b/recipes/telegram/package.json index ba4da14..5f6a543 100644 --- a/recipes/telegram/package.json +++ b/recipes/telegram/package.json @@ -1,7 +1,7 @@ { "id": "telegram", "name": "Telegram", - "version": "3.4.0", + "version": "3.4.1", "license": "MIT", "config": { "serviceURL": "https://web.telegram.org", diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js index 5a12adb..5126e7d 100644 --- a/recipes/telegram/webview.js +++ b/recipes/telegram/webview.js @@ -2,10 +2,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - const _path = _interopRequireDefault(require('path')); +const _path = _interopRequireDefault(require('path')); module.exports = (Ferdium, settings) => { - const telegramVersion = document.querySelector('meta[property="og:url"]')?.getAttribute('content'); + const telegramVersion = document + .querySelector('meta[property="og:url"]') + ?.getAttribute('content'); const isWebK = telegramVersion?.includes('/k/'); @@ -67,7 +69,9 @@ module.exports = (Ferdium, settings) => { const getActiveDialogTitle = () => { let element; - element = isWebK ? document.querySelector('.top .peer-title') : document.querySelector('.chat-list .ListItem .title > h3'); + element = isWebK + ? document.querySelector('.top .peer-title') + : document.querySelector('.chat-list .ListItem .title > h3'); Ferdium.setDialogTitle(element ? element.textContent : ''); }; @@ -82,27 +86,33 @@ module.exports = (Ferdium, settings) => { Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); // TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences - document.addEventListener('click', event => { - const link = event.target.closest('a[href^="http"]'); - const button = event.target.closest('button[title^="http"]'); - - if (link || button) { - const url = link ? link.getAttribute('href') : button.getAttribute('title'); - - if (!Ferdium.isImage(link)) { - event.preventDefault(); - event.stopPropagation(); - - if ( - settings.trapLinkClicks === true - || url.includes('t.me') - || url.includes('web.telegram.org') - ) { - window.location.href = url; - } else { - Ferdium.openNewWindow(url); + document.addEventListener( + 'click', + event => { + const link = event.target.closest('a[href^="http"]'); + const button = event.target.closest('button[title^="http"]'); + + if (link || button) { + const url = link + ? link.getAttribute('href') + : button.getAttribute('title'); + + if (!Ferdium.isImage(link)) { + event.preventDefault(); + event.stopPropagation(); + + if ( + settings.trapLinkClicks === true || + url.includes('t.me') || + url.includes('web.telegram.org') + ) { + window.location.href = url; + } else { + Ferdium.openNewWindow(url); + } } } - } - }, true); + }, + true, + ); }; diff --git a/recipes/tixio/package.json b/recipes/tixio/package.json index 4b4a365..7ca7492 100644 --- a/recipes/tixio/package.json +++ b/recipes/tixio/package.json @@ -1,14 +1,14 @@ { - "id": "tixio", - "name": "Tixio", - "version": "1.3.0", - "license": "MIT", - "repository": "https://github.com/hmcclungiii/franz-recipe-tixio", - "config": { - "serviceURL": "https://{teamId}.tixio.io/app/", - "message": "Franz Recipe for Tixio by hmcclungiii", - "hasTeamId": true, - "hasDirectMessages": false, - "urlInputSuffix": ".tixio.io/app/" - } + "id": "tixio", + "name": "Tixio", + "version": "1.3.1", + "license": "MIT", + "repository": "https://github.com/hmcclungiii/franz-recipe-tixio", + "config": { + "serviceURL": "https://{teamId}.tixio.io/app/", + "message": "Franz Recipe for Tixio by hmcclungiii", + "hasTeamId": true, + "hasDirectMessages": false, + "urlInputSuffix": ".tixio.io/app/" } +} diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index e3a8fa8..9b67de4 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json @@ -1,7 +1,7 @@ { "id": "whatsapp", "name": "WhatsApp", - "version": "3.5.0", + "version": "3.5.1", "license": "MIT", "config": { "serviceURL": "https://web.whatsapp.com", -- cgit v1.2.3-54-g00ecf