diff options
-rw-r--r-- | .vscode/extensions.json | 31 | ||||
-rw-r--r-- | .vscode/launch.json | 87 | ||||
-rw-r--r-- | .vscode/settings.json | 47 | ||||
-rw-r--r-- | .vscode/tasks.json | 18 | ||||
-rw-r--r-- | package.json | 6 | ||||
-rw-r--r-- | pnpm-lock.yaml | 104 | ||||
-rw-r--r-- | src/api/server/ServerApi.ts | 5 | ||||
-rw-r--r-- | src/models/Recipe.ts | 16 | ||||
-rw-r--r-- | src/stores/SettingsStore.ts | 6 | ||||
-rw-r--r-- | src/webview/contextMenuBuilder.ts | 12 | ||||
-rw-r--r-- | test/helpers/array-helpers.test.ts | 5 |
11 files changed, 28 insertions, 309 deletions
diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 9f26c98d1..000000000 --- a/.vscode/extensions.json +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | { | ||
2 | "recommendations": [ | ||
3 | "esbenp.prettier-vscode", | ||
4 | "dbaeumer.vscode-eslint", | ||
5 | "codezombiech.gitignore", | ||
6 | "editorconfig.editorconfig", | ||
7 | "steoates.autoimport", | ||
8 | "formulahendry.auto-rename-tag", | ||
9 | "streetsidesoftware.code-spell-checker", | ||
10 | "naumovs.color-highlight", | ||
11 | "mkhl.direnv", | ||
12 | "ms-azuretools.vscode-docker", | ||
13 | "usernamehw.errorlens", | ||
14 | "dsznajder.es7-react-js-snippets", | ||
15 | "mhutchie.git-graph", | ||
16 | "vincaslt.highlight-matching-tag", | ||
17 | "eamodio.gitlens", | ||
18 | "jbockle.jbockle-format-files", | ||
19 | "wix.vscode-import-cost", | ||
20 | "visualstudioexptteam.intellicode-api-usage-examples", | ||
21 | "visualstudioexptteam.vscodeintellicode", | ||
22 | "orta.vscode-jest", | ||
23 | "pkief.material-icon-theme", | ||
24 | "techer.open-in-browser", | ||
25 | "christian-kohler.path-intellisense", | ||
26 | "ofhumanbondage.react-proptypes-intellisense", | ||
27 | "jingkaizhao.vscode-redux-devtools", | ||
28 | "planbcoding.vscode-react-refactor", | ||
29 | "redhat.vscode-yaml" | ||
30 | ] | ||
31 | } | ||
diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 24002a53b..000000000 --- a/.vscode/launch.json +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | { | ||
2 | "version": "0.2.0", | ||
3 | "configurations": [ | ||
4 | { | ||
5 | "name": "PowerShell Launch Current File", | ||
6 | "type": "PowerShell", | ||
7 | "request": "launch", | ||
8 | "script": "${file}", | ||
9 | "cwd": "${workspaceFolder}" | ||
10 | }, | ||
11 | { | ||
12 | "type": "node", | ||
13 | "request": "launch", | ||
14 | "name": "Ferdium - Test API", | ||
15 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
16 | "program": "${workspaceFolder}/build/index.js", | ||
17 | "protocol": "inspector", | ||
18 | "env": { | ||
19 | "NODE_ENV": "development", | ||
20 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
21 | } | ||
22 | }, | ||
23 | { | ||
24 | "type": "node", | ||
25 | "request": "launch", | ||
26 | "name": "Ferdium – Live API", | ||
27 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
28 | "program": "${workspaceFolder}/build/index.js", | ||
29 | "protocol": "inspector", | ||
30 | "env": { | ||
31 | "USE_LIVE_API": "1", | ||
32 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
33 | } | ||
34 | }, | ||
35 | { | ||
36 | "type": "node", | ||
37 | "request": "launch", | ||
38 | "name": "Ferdium – Local API", | ||
39 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
40 | "program": "${workspaceFolder}/build/index.js", | ||
41 | "protocol": "inspector", | ||
42 | "env": { | ||
43 | "USE_LOCAL_API": "1", | ||
44 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
45 | } | ||
46 | }, | ||
47 | { | ||
48 | "type": "node", | ||
49 | "request": "launch", | ||
50 | "name": "(Win Sim) Ferdium - Test API", | ||
51 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
52 | "program": "${workspaceFolder}/build/index.js", | ||
53 | "protocol": "inspector", | ||
54 | "env": { | ||
55 | "NODE_ENV": "development", | ||
56 | "OS_PLATFORM": "win32", | ||
57 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
58 | } | ||
59 | }, | ||
60 | { | ||
61 | "type": "node", | ||
62 | "request": "launch", | ||
63 | "name": "(Win Sim) Ferdium – Live API", | ||
64 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
65 | "program": "${workspaceFolder}/build/index.js", | ||
66 | "protocol": "inspector", | ||
67 | "env": { | ||
68 | "USE_LIVE_API": "1", | ||
69 | "OS_PLATFORM": "win32", | ||
70 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
71 | } | ||
72 | }, | ||
73 | { | ||
74 | "type": "node", | ||
75 | "request": "launch", | ||
76 | "name": "(Win Sim) Ferdium – Local API", | ||
77 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", | ||
78 | "program": "${workspaceFolder}/build/index.js", | ||
79 | "protocol": "inspector", | ||
80 | "env": { | ||
81 | "USE_LOCAL_API": "1", | ||
82 | "OS_PLATFORM": "win32", | ||
83 | "DEBUG": "*,-engine.io*,-socket.io*" | ||
84 | } | ||
85 | } | ||
86 | ] | ||
87 | } | ||
diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 42a06efe9..000000000 --- a/.vscode/settings.json +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | { | ||
2 | "prettier.singleQuote": true, | ||
3 | "js/ts.implicitProjectConfig.experimentalDecorators": true, | ||
4 | "yaml.schemas": { | ||
5 | "https://json.schemastore.org/github-issue-config.json": ".github/ISSUE_TEMPLATE/config.yml" | ||
6 | }, | ||
7 | |||
8 | // "editor.fontFamily": "Fira Code", | ||
9 | // "editor.fontLigatures": true, | ||
10 | "editor.detectIndentation": false, | ||
11 | "editor.guides.bracketPairs": "active", | ||
12 | "editor.codeActionsOnSave": { | ||
13 | "source.fixAll": "explicit", | ||
14 | "source.fixAll.eslint": "explicit" | ||
15 | }, | ||
16 | |||
17 | // "explorer.confirmDelete": false, | ||
18 | // "explorer.confirmDragAndDrop": false, | ||
19 | |||
20 | // "eslint.runtime": "node", | ||
21 | "eslint.format.enable": true, | ||
22 | "eslint.workingDirectories": [{ "mode": "auto" }], | ||
23 | // "eslint.packageManager": "npm", | ||
24 | "eslint.validate": [ | ||
25 | "javascript", | ||
26 | "javascriptreact", | ||
27 | "typescript", | ||
28 | "typescriptreact" | ||
29 | ], | ||
30 | "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
31 | |||
32 | // "workbench.colorTheme": "Visual Studio Dark", | ||
33 | // "workbench.iconTheme": "material-icon-theme", | ||
34 | |||
35 | "terminal.integrated.sendKeybindingsToShell": true, | ||
36 | // "terminal.integrated.copyOnSelection": true, | ||
37 | "terminal.integrated.defaultProfile.osx": "zsh", | ||
38 | "terminal.integrated.cursorBlinking": true, | ||
39 | |||
40 | "git.enableSmartCommit": true, | ||
41 | "diffEditor.ignoreTrimWhitespace": false, | ||
42 | |||
43 | // "formatFiles.runOrganizeImports": true, | ||
44 | |||
45 | "javascript.preferences.importModuleSpecifier": "relative", | ||
46 | "typescript.preferences.importModuleSpecifier": "relative" | ||
47 | } | ||
diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 1cc1b79e7..000000000 --- a/.vscode/tasks.json +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | { | ||
2 | "version": "2.0.0", | ||
3 | "tasks": [ | ||
4 | { | ||
5 | "type": "pnpm", | ||
6 | "script": "dev", | ||
7 | "group": { | ||
8 | "kind": "build", | ||
9 | "isDefault": true | ||
10 | } | ||
11 | }, | ||
12 | { | ||
13 | "type": "pnpm", | ||
14 | "script": "lint", | ||
15 | "group": "test" | ||
16 | } | ||
17 | ] | ||
18 | } | ||
diff --git a/package.json b/package.json index be3f7ade7..3122236ae 100644 --- a/package.json +++ b/package.json | |||
@@ -23,7 +23,7 @@ | |||
23 | }, | 23 | }, |
24 | "packageManager": "pnpm@8.15.5", | 24 | "packageManager": "pnpm@8.15.5", |
25 | "scripts": { | 25 | "scripts": { |
26 | "prepare": "is-ci || husky install", | 26 | "prepare": "is-ci || husky", |
27 | "start": "electron ./build", | 27 | "start": "electron ./build", |
28 | "start:local": "cross-env USE_LOCAL_API=1 pnpm start", | 28 | "start:local": "cross-env USE_LOCAL_API=1 pnpm start", |
29 | "start:live": "cross-env USE_LIVE_API=1 pnpm start", | 29 | "start:live": "cross-env USE_LIVE_API=1 pnpm start", |
@@ -49,10 +49,8 @@ | |||
49 | "add-crowdin-contributors": "ts-node scripts/add-crowdin-contributors.ts", | 49 | "add-crowdin-contributors": "ts-node scripts/add-crowdin-contributors.ts", |
50 | "debug": "cross-env-shell DEBUG_COLORS=1 DEBUG=Ferdium:* pnpm start:all-dev" | 50 | "debug": "cross-env-shell DEBUG_COLORS=1 DEBUG=Ferdium:* pnpm start:all-dev" |
51 | }, | 51 | }, |
52 | "keywords": [], | ||
53 | "dependencies": { | 52 | "dependencies": { |
54 | "@adonisjs/ace": "5.1.0", | 53 | "@adonisjs/ace": "5.1.0", |
55 | "@adonisjs/auth": "3.2.0", | ||
56 | "@adonisjs/bodyparser": "2.3.0", | 54 | "@adonisjs/bodyparser": "2.3.0", |
57 | "@adonisjs/cors": "1.0.7", | 55 | "@adonisjs/cors": "1.0.7", |
58 | "@adonisjs/drive": "1.0.4", | 56 | "@adonisjs/drive": "1.0.4", |
@@ -60,11 +58,9 @@ | |||
60 | "@adonisjs/framework": "5.0.13", | 58 | "@adonisjs/framework": "5.0.13", |
61 | "@adonisjs/ignitor": "2.0.8", | 59 | "@adonisjs/ignitor": "2.0.8", |
62 | "@adonisjs/lucid": "6.3.0", | 60 | "@adonisjs/lucid": "6.3.0", |
63 | "@adonisjs/session": "1.1.0", | ||
64 | "@adonisjs/shield": "1.1.0", | 61 | "@adonisjs/shield": "1.1.0", |
65 | "@adonisjs/validator": "5.1.0", | 62 | "@adonisjs/validator": "5.1.0", |
66 | "@electron/remote": "2.1.2", | 63 | "@electron/remote": "2.1.2", |
67 | "@emotion/react": "11.11.4", | ||
68 | "@emotion/styled": "11.11.5", | 64 | "@emotion/styled": "11.11.5", |
69 | "@mdi/js": "7.4.47", | 65 | "@mdi/js": "7.4.47", |
70 | "@mdi/react": "1.6.1", | 66 | "@mdi/react": "1.6.1", |
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37b15ce36..69f6a5eb0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml | |||
@@ -11,9 +11,6 @@ dependencies: | |||
11 | '@adonisjs/ace': | 11 | '@adonisjs/ace': |
12 | specifier: 5.1.0 | 12 | specifier: 5.1.0 |
13 | version: 5.1.0 | 13 | version: 5.1.0 |
14 | '@adonisjs/auth': | ||
15 | specifier: 3.2.0 | ||
16 | version: 3.2.0 | ||
17 | '@adonisjs/bodyparser': | 14 | '@adonisjs/bodyparser': |
18 | specifier: 2.3.0 | 15 | specifier: 2.3.0 |
19 | version: 2.3.0 | 16 | version: 2.3.0 |
@@ -35,9 +32,6 @@ dependencies: | |||
35 | '@adonisjs/lucid': | 32 | '@adonisjs/lucid': |
36 | specifier: 6.3.0 | 33 | specifier: 6.3.0 |
37 | version: 6.3.0(sqlite3@5.1.6) | 34 | version: 6.3.0(sqlite3@5.1.6) |
38 | '@adonisjs/session': | ||
39 | specifier: 1.1.0 | ||
40 | version: 1.1.0 | ||
41 | '@adonisjs/shield': | 35 | '@adonisjs/shield': |
42 | specifier: 1.1.0 | 36 | specifier: 1.1.0 |
43 | version: 1.1.0 | 37 | version: 1.1.0 |
@@ -47,9 +41,6 @@ dependencies: | |||
47 | '@electron/remote': | 41 | '@electron/remote': |
48 | specifier: 2.1.2 | 42 | specifier: 2.1.2 |
49 | version: 2.1.2(electron@29.3.0) | 43 | version: 2.1.2(electron@29.3.0) |
50 | '@emotion/react': | ||
51 | specifier: 11.11.4 | ||
52 | version: 11.11.4(@types/react@18.2.77)(react@18.2.0) | ||
53 | '@emotion/styled': | 44 | '@emotion/styled': |
54 | specifier: 11.11.5 | 45 | specifier: 11.11.5 |
55 | version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.77)(react@18.2.0) | 46 | version: 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.77)(react@18.2.0) |
@@ -478,21 +469,6 @@ packages: | |||
478 | - supports-color | 469 | - supports-color |
479 | dev: false | 470 | dev: false |
480 | 471 | ||
481 | /@adonisjs/auth@3.2.0: | ||
482 | resolution: {integrity: sha512-Bawnpg8BaPrVmG1QhX3egw2SfYOtrOcMpn2q/ck58J9A4WUJAk1LZWXIeu2AF0jrASZuXlmdy4HIMFpl8NKVZg==} | ||
483 | dependencies: | ||
484 | '@adonisjs/generic-exceptions': 2.0.1 | ||
485 | basic-auth: 2.0.1 | ||
486 | debug: 4.3.4(supports-color@5.5.0) | ||
487 | jsonwebtoken: 8.5.1 | ||
488 | lodash: 4.17.21 | ||
489 | ms: 2.1.3 | ||
490 | resetable: 1.0.3 | ||
491 | uuid: 8.3.2 | ||
492 | transitivePeerDependencies: | ||
493 | - supports-color | ||
494 | dev: false | ||
495 | |||
496 | /@adonisjs/bodyparser@2.3.0: | 472 | /@adonisjs/bodyparser@2.3.0: |
497 | resolution: {integrity: sha512-VIC8klEZsz2Zpw1YvqDhtcZS4qut01Mj/fOJCIjZDYIh5yIYgo535aW5NlCQ2bAPs4nzokNIKJUKcnkTAOTZQQ==} | 473 | resolution: {integrity: sha512-VIC8klEZsz2Zpw1YvqDhtcZS4qut01Mj/fOJCIjZDYIh5yIYgo535aW5NlCQ2bAPs4nzokNIKJUKcnkTAOTZQQ==} |
498 | dependencies: | 474 | dependencies: |
@@ -618,21 +594,6 @@ packages: | |||
618 | - supports-color | 594 | - supports-color |
619 | dev: false | 595 | dev: false |
620 | 596 | ||
621 | /@adonisjs/session@1.1.0: | ||
622 | resolution: {integrity: sha512-phbTPevvmVcWgq1BXj5VM7MR5+MzXlQgl6Dc0zr8jfftYBscxoiirSaISJYWCwNO6HrPQon54a1/gx9Jr6ebGQ==} | ||
623 | dependencies: | ||
624 | '@adonisjs/generic-exceptions': 2.0.1 | ||
625 | bson: 1.1.6 | ||
626 | debug: 4.3.4(supports-color@5.5.0) | ||
627 | fs-extra: 9.1.0 | ||
628 | lodash: 4.17.21 | ||
629 | ms: 2.1.3 | ||
630 | type-of-is: 3.5.1 | ||
631 | uuid: 8.3.2 | ||
632 | transitivePeerDependencies: | ||
633 | - supports-color | ||
634 | dev: false | ||
635 | |||
636 | /@adonisjs/shield@1.1.0: | 597 | /@adonisjs/shield@1.1.0: |
637 | resolution: {integrity: sha512-3qVwnLTeTk5w0Agi7xuQKj7r7QeA1yFXy0QfpjTIYIzQVy9QTk3DgIK5ZvGtr/2/ESHVosyOrCGr+kQDjtcBhA==} | 598 | resolution: {integrity: sha512-3qVwnLTeTk5w0Agi7xuQKj7r7QeA1yFXy0QfpjTIYIzQVy9QTk3DgIK5ZvGtr/2/ESHVosyOrCGr+kQDjtcBhA==} |
638 | dependencies: | 599 | dependencies: |
@@ -1523,10 +1484,10 @@ packages: | |||
1523 | resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} | 1484 | resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} |
1524 | dependencies: | 1485 | dependencies: |
1525 | '@babel/helper-module-imports': 7.22.15 | 1486 | '@babel/helper-module-imports': 7.22.15 |
1526 | '@babel/runtime': 7.23.5 | 1487 | '@babel/runtime': 7.23.9 |
1527 | '@emotion/hash': 0.9.1 | 1488 | '@emotion/hash': 0.9.1 |
1528 | '@emotion/memoize': 0.8.1 | 1489 | '@emotion/memoize': 0.8.1 |
1529 | '@emotion/serialize': 1.1.2 | 1490 | '@emotion/serialize': 1.1.4 |
1530 | babel-plugin-macros: 3.1.0 | 1491 | babel-plugin-macros: 3.1.0 |
1531 | convert-source-map: 1.9.0 | 1492 | convert-source-map: 1.9.0 |
1532 | escape-string-regexp: 4.0.0 | 1493 | escape-string-regexp: 4.0.0 |
@@ -1587,7 +1548,7 @@ packages: | |||
1587 | '@babel/runtime': 7.23.9 | 1548 | '@babel/runtime': 7.23.9 |
1588 | '@emotion/babel-plugin': 11.11.0 | 1549 | '@emotion/babel-plugin': 11.11.0 |
1589 | '@emotion/cache': 11.11.0 | 1550 | '@emotion/cache': 11.11.0 |
1590 | '@emotion/serialize': 1.1.3 | 1551 | '@emotion/serialize': 1.1.4 |
1591 | '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) | 1552 | '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) |
1592 | '@emotion/utils': 1.2.1 | 1553 | '@emotion/utils': 1.2.1 |
1593 | '@emotion/weak-memoize': 0.3.1 | 1554 | '@emotion/weak-memoize': 0.3.1 |
@@ -1596,26 +1557,6 @@ packages: | |||
1596 | react: 18.2.0 | 1557 | react: 18.2.0 |
1597 | dev: false | 1558 | dev: false |
1598 | 1559 | ||
1599 | /@emotion/serialize@1.1.2: | ||
1600 | resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} | ||
1601 | dependencies: | ||
1602 | '@emotion/hash': 0.9.1 | ||
1603 | '@emotion/memoize': 0.8.1 | ||
1604 | '@emotion/unitless': 0.8.1 | ||
1605 | '@emotion/utils': 1.2.1 | ||
1606 | csstype: 3.1.3 | ||
1607 | dev: false | ||
1608 | |||
1609 | /@emotion/serialize@1.1.3: | ||
1610 | resolution: {integrity: sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==} | ||
1611 | dependencies: | ||
1612 | '@emotion/hash': 0.9.1 | ||
1613 | '@emotion/memoize': 0.8.1 | ||
1614 | '@emotion/unitless': 0.8.1 | ||
1615 | '@emotion/utils': 1.2.1 | ||
1616 | csstype: 3.1.3 | ||
1617 | dev: false | ||
1618 | |||
1619 | /@emotion/serialize@1.1.4: | 1560 | /@emotion/serialize@1.1.4: |
1620 | resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} | 1561 | resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} |
1621 | dependencies: | 1562 | dependencies: |
@@ -3108,8 +3049,8 @@ packages: | |||
3108 | resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} | 3049 | resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} |
3109 | dev: true | 3050 | dev: true |
3110 | 3051 | ||
3111 | /@types/parse-json@4.0.0: | 3052 | /@types/parse-json@4.0.2: |
3112 | resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} | 3053 | resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} |
3113 | dev: false | 3054 | dev: false |
3114 | 3055 | ||
3115 | /@types/plist@3.0.5: | 3056 | /@types/plist@3.0.5: |
@@ -4482,13 +4423,6 @@ packages: | |||
4482 | pascalcase: 0.1.1 | 4423 | pascalcase: 0.1.1 |
4483 | dev: false | 4424 | dev: false |
4484 | 4425 | ||
4485 | /basic-auth@2.0.1: | ||
4486 | resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} | ||
4487 | engines: {node: '>= 0.8'} | ||
4488 | dependencies: | ||
4489 | safe-buffer: 5.1.2 | ||
4490 | dev: false | ||
4491 | |||
4492 | /bcrypt-pbkdf@1.0.2: | 4426 | /bcrypt-pbkdf@1.0.2: |
4493 | resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} | 4427 | resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} |
4494 | dependencies: | 4428 | dependencies: |
@@ -4620,11 +4554,6 @@ packages: | |||
4620 | node-int64: 0.4.0 | 4554 | node-int64: 0.4.0 |
4621 | dev: true | 4555 | dev: true |
4622 | 4556 | ||
4623 | /bson@1.1.6: | ||
4624 | resolution: {integrity: sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==} | ||
4625 | engines: {node: '>=0.6.19'} | ||
4626 | dev: false | ||
4627 | |||
4628 | /buffer-alloc-unsafe@1.1.0: | 4557 | /buffer-alloc-unsafe@1.1.0: |
4629 | resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} | 4558 | resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} |
4630 | dev: false | 4559 | dev: false |
@@ -5353,7 +5282,7 @@ packages: | |||
5353 | resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} | 5282 | resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} |
5354 | engines: {node: '>=10'} | 5283 | engines: {node: '>=10'} |
5355 | dependencies: | 5284 | dependencies: |
5356 | '@types/parse-json': 4.0.0 | 5285 | '@types/parse-json': 4.0.2 |
5357 | import-fresh: 3.3.0 | 5286 | import-fresh: 3.3.0 |
5358 | parse-json: 5.2.0 | 5287 | parse-json: 5.2.0 |
5359 | path-type: 4.0.0 | 5288 | path-type: 4.0.0 |
@@ -9422,22 +9351,6 @@ packages: | |||
9422 | engines: {'0': node >= 0.2.0} | 9351 | engines: {'0': node >= 0.2.0} |
9423 | dev: true | 9352 | dev: true |
9424 | 9353 | ||
9425 | /jsonwebtoken@8.5.1: | ||
9426 | resolution: {integrity: sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==} | ||
9427 | engines: {node: '>=4', npm: '>=1.4.28'} | ||
9428 | dependencies: | ||
9429 | jws: 3.2.2 | ||
9430 | lodash.includes: 4.3.0 | ||
9431 | lodash.isboolean: 3.0.3 | ||
9432 | lodash.isinteger: 4.0.4 | ||
9433 | lodash.isnumber: 3.0.3 | ||
9434 | lodash.isplainobject: 4.0.6 | ||
9435 | lodash.isstring: 4.0.1 | ||
9436 | lodash.once: 4.1.1 | ||
9437 | ms: 2.1.3 | ||
9438 | semver: 5.7.2 | ||
9439 | dev: false | ||
9440 | |||
9441 | /jsonwebtoken@9.0.2: | 9354 | /jsonwebtoken@9.0.2: |
9442 | resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} | 9355 | resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} |
9443 | engines: {node: '>=12', npm: '>=6'} | 9356 | engines: {node: '>=12', npm: '>=6'} |
@@ -13672,11 +13585,6 @@ packages: | |||
13672 | mime-types: 2.1.35 | 13585 | mime-types: 2.1.35 |
13673 | dev: false | 13586 | dev: false |
13674 | 13587 | ||
13675 | /type-of-is@3.5.1: | ||
13676 | resolution: {integrity: sha512-SOnx8xygcAh8lvDU2exnK2bomASfNjzB3Qz71s2tw9QnX8fkAo7aC+D0H7FV0HjRKj94CKV2Hi71kVkkO6nOxg==} | ||
13677 | engines: {node: '>=0.10.5'} | ||
13678 | dev: false | ||
13679 | |||
13680 | /type@2.7.2: | 13588 | /type@2.7.2: |
13681 | resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} | 13589 | resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} |
13682 | dev: false | 13590 | dev: false |
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index 69994114e..ab6866b13 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts | |||
@@ -379,8 +379,7 @@ export default class ServerApi { | |||
379 | .filter(recipe => recipe.id); | 379 | .filter(recipe => recipe.id); |
380 | 380 | ||
381 | // @ts-expect-error Type 'boolean' is not assignable to type 'ConcatArray<IRecipe>'. | 381 | // @ts-expect-error Type 'boolean' is not assignable to type 'ConcatArray<IRecipe>'. |
382 | // eslint-disable-next-line unicorn/prefer-spread | 382 | this.recipes = [...this.recipes, ...this._getDevRecipes()]; |
383 | this.recipes = this.recipes.concat(this._getDevRecipes()); | ||
384 | 383 | ||
385 | debug('StubServerApi::getInstalledRecipes resolves', this.recipes); | 384 | debug('StubServerApi::getInstalledRecipes resolves', this.recipes); |
386 | return this.recipes; | 385 | return this.recipes; |
@@ -582,7 +581,7 @@ export default class ServerApi { | |||
582 | file !== 'temp', | 581 | file !== 'temp', |
583 | ); | 582 | ); |
584 | 583 | ||
585 | const recipes = paths | 584 | const recipes: IRecipe[] = paths |
586 | .map(id => { | 585 | .map(id => { |
587 | try { | 586 | try { |
588 | // eslint-disable-next-line import/no-dynamic-require | 587 | // eslint-disable-next-line import/no-dynamic-require |
diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts index e8f11df5f..11eb1884f 100644 --- a/src/models/Recipe.ts +++ b/src/models/Recipe.ts | |||
@@ -50,14 +50,14 @@ export interface IRecipe { | |||
50 | partition: string; | 50 | partition: string; |
51 | local: boolean; | 51 | local: boolean; |
52 | 52 | ||
53 | // eslint-disable-next-line @typescript-eslint/ban-types | 53 | readonly overrideUserAgent?: () => string; |
54 | readonly overrideUserAgent?: null | Function; | 54 | |
55 | // eslint-disable-next-line @typescript-eslint/ban-types | 55 | readonly buildUrl?: (url: string) => string; |
56 | readonly buildUrl?: null | Function; | 56 | |
57 | // eslint-disable-next-line @typescript-eslint/ban-types | 57 | readonly modifyRequestHeaders?: () => void; |
58 | readonly modifyRequestHeaders?: null | Function; | 58 | |
59 | // eslint-disable-next-line @typescript-eslint/ban-types | 59 | readonly knownCertificateHosts?: () => void; |
60 | readonly knownCertificateHosts?: null | Function; | 60 | |
61 | readonly events?: null | ((key: string) => string); | 61 | readonly events?: null | ((key: string) => string); |
62 | 62 | ||
63 | // TODO: [TS DEBT] Need to check if below properties are needed and where is inherited / implemented from | 63 | // TODO: [TS DEBT] Need to check if below properties are needed and where is inherited / implemented from |
diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts index 72d6331cb..29f173f91 100644 --- a/src/stores/SettingsStore.ts +++ b/src/stores/SettingsStore.ts | |||
@@ -183,8 +183,10 @@ export default class SettingsStore extends TypedStore { | |||
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
186 | // eslint-disable-next-line @typescript-eslint/ban-types | 186 | _ensureMigrationAndMarkDone( |
187 | _ensureMigrationAndMarkDone(migrationName: string, callback: Function): void { | 187 | migrationName: string, |
188 | callback: () => void, | ||
189 | ): void { | ||
188 | if (!this.all.migration[migrationName]) { | 190 | if (!this.all.migration[migrationName]) { |
189 | callback(); | 191 | callback(); |
190 | 192 | ||
diff --git a/src/webview/contextMenuBuilder.ts b/src/webview/contextMenuBuilder.ts index dd39560da..f81b051ee 100644 --- a/src/webview/contextMenuBuilder.ts +++ b/src/webview/contextMenuBuilder.ts | |||
@@ -288,11 +288,9 @@ export class ContextMenuBuilder { | |||
288 | this.addPaste(menu, menuInfo); | 288 | this.addPaste(menu, menuInfo); |
289 | this.addPastePlain(menu, menuInfo); | 289 | this.addPastePlain(menu, menuInfo); |
290 | this.addInspectElement(menu, menuInfo); | 290 | this.addInspectElement(menu, menuInfo); |
291 | // @ts-expect-error Expected 1 arguments, but got 2. | 291 | this.processMenu(menu); |
292 | this.processMenu(menu, menuInfo); | ||
293 | 292 | ||
294 | // @ts-expect-error Expected 2 arguments, but got 1. | 293 | this.copyPageUrl(menu, menuInfo); |
295 | this.copyPageUrl(menu); | ||
296 | this.goToHomePage(menu, menuInfo); | 294 | this.goToHomePage(menu, menuInfo); |
297 | this.openInBrowser(menu, menuInfo); | 295 | this.openInBrowser(menu, menuInfo); |
298 | 296 | ||
@@ -349,14 +347,12 @@ export class ContextMenuBuilder { | |||
349 | } | 347 | } |
350 | 348 | ||
351 | this.addInspectElement(menu, menuInfo); | 349 | this.addInspectElement(menu, menuInfo); |
352 | // @ts-expect-error Expected 1 arguments, but got 2. | 350 | this.processMenu(menu); |
353 | this.processMenu(menu, menuInfo); | ||
354 | 351 | ||
355 | this.addSeparator(menu); | 352 | this.addSeparator(menu); |
356 | this.goBack(menu); | 353 | this.goBack(menu); |
357 | this.goForward(menu); | 354 | this.goForward(menu); |
358 | // @ts-expect-error Expected 2 arguments, but got 1. | 355 | this.copyPageUrl(menu, menuInfo); |
359 | this.copyPageUrl(menu); | ||
360 | this.goToHomePage(menu, menuInfo); | 356 | this.goToHomePage(menu, menuInfo); |
361 | this.openInBrowser(menu, menuInfo); | 357 | this.openInBrowser(menu, menuInfo); |
362 | 358 | ||
diff --git a/test/helpers/array-helpers.test.ts b/test/helpers/array-helpers.test.ts index 662d6b828..135123b6a 100644 --- a/test/helpers/array-helpers.test.ts +++ b/test/helpers/array-helpers.test.ts | |||
@@ -7,7 +7,8 @@ describe('array_helpers', () => { | |||
7 | 7 | ||
8 | // Expect the arrays to be exactly the same | 8 | // Expect the arrays to be exactly the same |
9 | // when both are sorted alphabetically | 9 | // when both are sorted alphabetically |
10 | // eslint-disable-next-line sonar/no-alphabetical-sort | 10 | expect(shuffledArray.toSorted((a, b) => a.localeCompare(b))).toEqual( |
11 | expect(shuffledArray.sort()).toEqual(originalArray.sort()); | 11 | originalArray.toSorted((a, b) => a.localeCompare(b)), |
12 | ); | ||
12 | }); | 13 | }); |
13 | }); | 14 | }); |