diff options
author | 2023-07-26 16:35:49 +0000 | |
---|---|---|
committer | 2023-07-26 22:05:49 +0530 | |
commit | f9e2d9926e4dff14df0f13858a9c695e2118a94e (patch) | |
tree | 53f1cad4edde7436fa521deb002e14830809bb8b | |
parent | chore: improve lint setup (#397) (diff) | |
download | ferdium-recipes-f9e2d9926e4dff14df0f13858a9c695e2118a94e.tar.gz ferdium-recipes-f9e2d9926e4dff14df0f13858a9c695e2118a94e.tar.zst ferdium-recipes-f9e2d9926e4dff14df0f13858a9c695e2118a94e.zip |
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
26 files changed, 167 insertions, 151 deletions
diff --git a/package.json b/package.json index d310ebd..ce33b99 100644 --- a/package.json +++ b/package.json | |||
@@ -12,6 +12,7 @@ | |||
12 | "node": "18.15.0", | 12 | "node": "18.15.0", |
13 | "pnpm": "8.6.2" | 13 | "pnpm": "8.6.2" |
14 | }, | 14 | }, |
15 | "engine-strict": true, | ||
15 | "scripts": { | 16 | "scripts": { |
16 | "preinstall": "npx only-allow pnpm", | 17 | "preinstall": "npx only-allow pnpm", |
17 | "prepare": "is-ci || husky install", | 18 | "prepare": "is-ci || husky install", |
@@ -19,7 +20,7 @@ | |||
19 | "create": "node scripts/create.js", | 20 | "create": "node scripts/create.js", |
20 | "lint": "eslint \"{recipes,scripts}/**/*.{js,jsx,ts,tsx}\"", | 21 | "lint": "eslint \"{recipes,scripts}/**/*.{js,jsx,ts,tsx}\"", |
21 | "lint:fix": "pnpm lint --fix", | 22 | "lint:fix": "pnpm lint --fix", |
22 | "reformat-files": "prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,json,scss}\"", | 23 | "reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,json,scss}\"", |
23 | "contributors": "all-contributors" | 24 | "contributors": "all-contributors" |
24 | }, | 25 | }, |
25 | "repository": { | 26 | "repository": { |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "bard", | 2 | "id": "bard", |
3 | "name": "Bard", | 3 | "name": "Bard", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://bard.google.com/" | 7 | "serviceURL": "https://bard.google.com/" |
8 | } | 8 | } |
9 | } | 9 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "bluesky", | 2 | "id": "bluesky", |
3 | "name": "Bluesky", | 3 | "name": "Bluesky", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://staging.bsky.app/" | 7 | "serviceURL": "https://staging.bsky.app/" |
8 | } | ||
9 | } | 8 | } |
9 | } | ||
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 @@ | |||
1 | { | 1 | { |
2 | "id": "chatwoot", | 2 | "id": "chatwoot", |
3 | "name": "Chatwoot", | 3 | "name": "Chatwoot", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/maximeMD/ferdi-chatwoot", | 6 | "repository": "https://github.com/maximeMD/ferdi-chatwoot", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://app.chatwoot.com/app/login" | 8 | "serviceURL": "https://app.chatwoot.com/app/login" |
9 | } | ||
10 | } | 9 | } |
10 | } | ||
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 @@ | |||
1 | { | 1 | { |
2 | "id": "feedly", | 2 | "id": "feedly", |
3 | "name": "Feedly", | 3 | "name": "Feedly", |
4 | "version": "1.3.0", | 4 | "version": "1.3.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://feedly.com" | 7 | "serviceURL": "https://feedly.com" |
8 | } | 8 | } |
9 | } | 9 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "freshdesk", | 2 | "id": "freshdesk", |
3 | "name": "Freshdesk", | 3 | "name": "Freshdesk", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/fisknils/recipe-freshdesk", | 6 | "repository": "https://github.com/fisknils/recipe-freshdesk", |
7 | "config": { | 7 | "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 @@ | |||
1 | { | 1 | { |
2 | "id": "instagram-direct-messages", | 2 | "id": "instagram-direct-messages", |
3 | "name": "Instagram Direct Messages", | 3 | "name": "Instagram Direct Messages", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://www.instagram.com/direct/inbox/", | 7 | "serviceURL": "https://www.instagram.com/direct/inbox/", |
8 | "hasNotificationSound": true | 8 | "hasNotificationSound": true |
9 | } | 9 | } |
10 | } | 10 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "miro", | 2 | "id": "miro", |
3 | "name": "Miro", | 3 | "name": "Miro", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://miro.com/app/dashboard/" | 7 | "serviceURL": "https://miro.com/app/dashboard/" |
8 | } | 8 | } |
9 | } | 9 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "mirotalk-c2c", | 2 | "id": "mirotalk-c2c", |
3 | "name": "MiroTalk C2C", | 3 | "name": "MiroTalk C2C", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://c2c.mirotalk.com", | 7 | "serviceURL": "https://c2c.mirotalk.com", |
8 | "hasCustomUrl": true, | 8 | "hasCustomUrl": true, |
9 | "hasHostedOption": true, | 9 | "hasHostedOption": true, |
10 | "hasNotificationSound": true | 10 | "hasNotificationSound": true |
11 | } | 11 | } |
12 | } | 12 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "mirotalk-p2p", | 2 | "id": "mirotalk-p2p", |
3 | "name": "MiroTalk P2P", | 3 | "name": "MiroTalk P2P", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://p2p.mirotalk.com", | 7 | "serviceURL": "https://p2p.mirotalk.com", |
8 | "hasCustomUrl": true, | 8 | "hasCustomUrl": true, |
9 | "hasHostedOption": true, | 9 | "hasHostedOption": true, |
10 | "hasNotificationSound": true | 10 | "hasNotificationSound": true |
11 | } | 11 | } |
12 | } | 12 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "mirotalk-sfu", | 2 | "id": "mirotalk-sfu", |
3 | "name": "MiroTalk SFU", | 3 | "name": "MiroTalk SFU", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://sfu.mirotalk.com", | 7 | "serviceURL": "https://sfu.mirotalk.com", |
8 | "hasCustomUrl": true, | 8 | "hasCustomUrl": true, |
9 | "hasHostedOption": true, | 9 | "hasHostedOption": true, |
10 | "hasNotificationSound": true | 10 | "hasNotificationSound": true |
11 | } | 11 | } |
12 | } | 12 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "mirotalk-webrtc", | 2 | "id": "mirotalk-webrtc", |
3 | "name": "MiroTalk WebRTC", | 3 | "name": "MiroTalk WebRTC", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://webrtc.mirotalk.com", | 7 | "serviceURL": "https://webrtc.mirotalk.com", |
8 | "hasCustomUrl": true, | 8 | "hasCustomUrl": true, |
9 | "hasHostedOption": true, | 9 | "hasHostedOption": true, |
10 | "hasNotificationSound": true | 10 | "hasNotificationSound": true |
11 | } | 11 | } |
12 | } | 12 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "office365-owa", | 2 | "id": "office365-owa", |
3 | "name": "Office 365 Outlook", | 3 | "name": "Office 365 Outlook", |
4 | "version": "1.7.0", | 4 | "version": "1.7.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "aliases": [ | 6 | "aliases": [ |
7 | "live.com", | 7 | "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) => { | |||
14 | ); | 14 | ); |
15 | for (const child of allScreenReaders) { | 15 | for (const child of allScreenReaders) { |
16 | if (child.previousSibling) { | 16 | if (child.previousSibling) { |
17 | unreadCount += Ferdium.safeParseInt(child.previousSibling.textContent); | 17 | unreadCount += Ferdium.safeParseInt( |
18 | child.previousSibling.textContent, | ||
19 | ); | ||
18 | } | 20 | } |
19 | } | 21 | } |
20 | } | 22 | } |
@@ -27,7 +29,8 @@ module.exports = (Ferdium, settings) => { | |||
27 | if (/\/owa/.test(location.pathname)) { | 29 | if (/\/owa/.test(location.pathname)) { |
28 | // classic app | 30 | // classic app |
29 | directUnreadCount = Ferdium.safeParseInt( | 31 | directUnreadCount = Ferdium.safeParseInt( |
30 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0]?.textContent | 32 | document.querySelectorAll("span[title*='Inbox'] + div > span")[0] |
33 | ?.textContent, | ||
31 | ); | 34 | ); |
32 | } else { | 35 | } else { |
33 | // new app | 36 | // 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 @@ | |||
1 | { | 1 | { |
2 | "id": "perplexity", | 2 | "id": "perplexity", |
3 | "name": "Perplexity AI", | 3 | "name": "Perplexity AI", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://www.perplexity.ai/" | 7 | "serviceURL": "https://www.perplexity.ai/" |
8 | } | 8 | } |
9 | } | 9 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "reclaim", | 2 | "id": "reclaim", |
3 | "name": "Reclaim", | 3 | "name": "Reclaim", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://app.reclaim.ai/" | 7 | "serviceURL": "https://app.reclaim.ai/" |
8 | } | ||
9 | } | 8 | } |
9 | } | ||
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 @@ | |||
1 | { | 1 | { |
2 | "id": "skiff-mail", | 2 | "id": "skiff-mail", |
3 | "name": "Skiff Mail", | 3 | "name": "Skiff Mail", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://app.skiff.com/mail/inbox" | 7 | "serviceURL": "https://app.skiff.com/mail/inbox" |
8 | } | 8 | } |
9 | } | 9 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "skype", | 2 | "id": "skype", |
3 | "name": "Skype", | 3 | "name": "Skype", |
4 | "version": "3.6.0", | 4 | "version": "3.6.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.skype.com/", | 7 | "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 @@ | |||
1 | { | 1 | { |
2 | "id": "tchap", | 2 | "id": "tchap", |
3 | "name": "Tchap", | 3 | "name": "Tchap", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/Sykursen/recipe-tchap/", | 6 | "repository": "https://github.com/Sykursen/recipe-tchap/", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://www.tchap.gouv.fr/" | 8 | "serviceURL": "https://www.tchap.gouv.fr/" |
9 | } | ||
10 | } | 9 | } |
10 | } | ||
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 @@ | |||
1 | { | 1 | { |
2 | "id": "teamweek", | 2 | "id": "teamweek", |
3 | "name": "Teamweek", | 3 | "name": "Teamweek", |
4 | "version": "1.3.0", | 4 | "version": "1.3.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/claudiupelmus/recipe-teamweek", | 6 | "repository": "https://github.com/claudiupelmus/recipe-teamweek", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://app.teamweek.com/" | 8 | "serviceURL": "https://app.teamweek.com/" |
9 | } | 9 | } |
10 | } | 10 | } |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "telegram", | 2 | "id": "telegram", |
3 | "name": "Telegram", | 3 | "name": "Telegram", |
4 | "version": "3.4.0", | 4 | "version": "3.4.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.telegram.org", | 7 | "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) { | |||
2 | return obj && obj.__esModule ? obj : { default: obj }; | 2 | return obj && obj.__esModule ? obj : { default: obj }; |
3 | } | 3 | } |
4 | 4 | ||
5 | const _path = _interopRequireDefault(require('path')); | 5 | const _path = _interopRequireDefault(require('path')); |
6 | 6 | ||
7 | module.exports = (Ferdium, settings) => { | 7 | module.exports = (Ferdium, settings) => { |
8 | const telegramVersion = document.querySelector('meta[property="og:url"]')?.getAttribute('content'); | 8 | const telegramVersion = document |
9 | .querySelector('meta[property="og:url"]') | ||
10 | ?.getAttribute('content'); | ||
9 | 11 | ||
10 | const isWebK = telegramVersion?.includes('/k/'); | 12 | const isWebK = telegramVersion?.includes('/k/'); |
11 | 13 | ||
@@ -67,7 +69,9 @@ module.exports = (Ferdium, settings) => { | |||
67 | const getActiveDialogTitle = () => { | 69 | const getActiveDialogTitle = () => { |
68 | let element; | 70 | let element; |
69 | 71 | ||
70 | element = isWebK ? document.querySelector('.top .peer-title') : document.querySelector('.chat-list .ListItem .title > h3'); | 72 | element = isWebK |
73 | ? document.querySelector('.top .peer-title') | ||
74 | : document.querySelector('.chat-list .ListItem .title > h3'); | ||
71 | 75 | ||
72 | Ferdium.setDialogTitle(element ? element.textContent : ''); | 76 | Ferdium.setDialogTitle(element ? element.textContent : ''); |
73 | }; | 77 | }; |
@@ -82,27 +86,33 @@ module.exports = (Ferdium, settings) => { | |||
82 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | 86 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
83 | 87 | ||
84 | // 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 | 88 | // 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 |
85 | document.addEventListener('click', event => { | 89 | document.addEventListener( |
86 | const link = event.target.closest('a[href^="http"]'); | 90 | 'click', |
87 | const button = event.target.closest('button[title^="http"]'); | 91 | event => { |
88 | 92 | const link = event.target.closest('a[href^="http"]'); | |
89 | if (link || button) { | 93 | const button = event.target.closest('button[title^="http"]'); |
90 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | 94 | |
91 | 95 | if (link || button) { | |
92 | if (!Ferdium.isImage(link)) { | 96 | const url = link |
93 | event.preventDefault(); | 97 | ? link.getAttribute('href') |
94 | event.stopPropagation(); | 98 | : button.getAttribute('title'); |
95 | 99 | ||
96 | if ( | 100 | if (!Ferdium.isImage(link)) { |
97 | settings.trapLinkClicks === true | 101 | event.preventDefault(); |
98 | || url.includes('t.me') | 102 | event.stopPropagation(); |
99 | || url.includes('web.telegram.org') | 103 | |
100 | ) { | 104 | if ( |
101 | window.location.href = url; | 105 | settings.trapLinkClicks === true || |
102 | } else { | 106 | url.includes('t.me') || |
103 | Ferdium.openNewWindow(url); | 107 | url.includes('web.telegram.org') |
108 | ) { | ||
109 | window.location.href = url; | ||
110 | } else { | ||
111 | Ferdium.openNewWindow(url); | ||
112 | } | ||
104 | } | 113 | } |
105 | } | 114 | } |
106 | } | 115 | }, |
107 | }, true); | 116 | true, |
117 | ); | ||
108 | }; | 118 | }; |
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 @@ | |||
1 | { | 1 | { |
2 | "id": "tixio", | 2 | "id": "tixio", |
3 | "name": "Tixio", | 3 | "name": "Tixio", |
4 | "version": "1.3.0", | 4 | "version": "1.3.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/hmcclungiii/franz-recipe-tixio", | 6 | "repository": "https://github.com/hmcclungiii/franz-recipe-tixio", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://{teamId}.tixio.io/app/", | 8 | "serviceURL": "https://{teamId}.tixio.io/app/", |
9 | "message": "Franz Recipe for Tixio by hmcclungiii", | 9 | "message": "Franz Recipe for Tixio by hmcclungiii", |
10 | "hasTeamId": true, | 10 | "hasTeamId": true, |
11 | "hasDirectMessages": false, | 11 | "hasDirectMessages": false, |
12 | "urlInputSuffix": ".tixio.io/app/" | 12 | "urlInputSuffix": ".tixio.io/app/" |
13 | } | ||
14 | } | 13 | } |
14 | } | ||
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 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "3.5.0", | 4 | "version": "3.5.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.whatsapp.com", | 7 | "serviceURL": "https://web.whatsapp.com", |
diff --git a/scripts/create.js b/scripts/create.js index 158b2f2..872b527 100644 --- a/scripts/create.js +++ b/scripts/create.js | |||
@@ -1,4 +1,5 @@ | |||
1 | /* eslint-disable no-console */ | 1 | /* eslint-disable no-console */ |
2 | |||
2 | /** | 3 | /** |
3 | * Create a new recipe for your service | 4 | * Create a new recipe for your service |
4 | */ | 5 | */ |
@@ -74,9 +75,9 @@ const pascalCasedName = toPascalCase(recipe); // PascalCased recipe ID only cont | |||
74 | for (const file of filesThatNeedTextReplace) { | 75 | for (const file of filesThatNeedTextReplace) { |
75 | const filePath = path.join(newRecipeFolder, file); | 76 | const filePath = path.join(newRecipeFolder, file); |
76 | let contents = fs.readFileSync(filePath, 'utf8'); | 77 | let contents = fs.readFileSync(filePath, 'utf8'); |
77 | contents = contents.replace(/SERVICE/g, recipe); | 78 | contents = contents.replaceAll('SERVICE', recipe); |
78 | contents = contents.replace(/SNAME/g, recipeName); | 79 | contents = contents.replaceAll('SNAME', recipeName); |
79 | contents = contents.replace(/SPASCAL/g, pascalCasedName); | 80 | contents = contents.replaceAll('SPASCAL', pascalCasedName); |
80 | fs.writeFileSync(filePath, contents); | 81 | fs.writeFileSync(filePath, contents); |
81 | } | 82 | } |
82 | console.log('[Info] Prepared new recipe'); | 83 | console.log('[Info] Prepared new recipe'); |
diff --git a/scripts/package.js b/scripts/package.js index 0482775..c2e2ab7 100644 --- a/scripts/package.js +++ b/scripts/package.js | |||
@@ -1,4 +1,5 @@ | |||
1 | /* eslint-disable no-console */ | 1 | /* eslint-disable no-console */ |
2 | |||
2 | /** | 3 | /** |
3 | * Package all recipes | 4 | * Package all recipes |
4 | */ | 5 | */ |