From 0e115e06b1cd36d5dffef7dc0544363f4186d34b Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Wed, 3 Apr 2024 07:55:42 +0200 Subject: [PATCH 01/42] Refactor Webpacks (#1212) refactor webpacks --- frontend/src/contexts/AppContext.tsx | 20 ++++- .../Settings.default.basic.selfhosted.ts | 4 +- .../models/Settings.default.pro.selfhosted.ts | 4 +- frontend/src/models/Settings.default.pro.ts | 4 +- frontend/src/services/Native/index.d.ts | 1 + frontend/webpack.config.ts | 89 +------------------ nodeapp/basic.html | 5 +- nodeapp/pro.html | 5 +- web/basic.html | 3 + web/pro.html | 5 +- 10 files changed, 41 insertions(+), 99 deletions(-) diff --git a/frontend/src/contexts/AppContext.tsx b/frontend/src/contexts/AppContext.tsx index 99f91995..b2a79260 100644 --- a/frontend/src/contexts/AppContext.tsx +++ b/frontend/src/contexts/AppContext.tsx @@ -20,6 +20,9 @@ import { createTheme, type Theme } from '@mui/material/styles'; import i18n from '../i18n/Web'; import getWorldmapGeojson from '../geo/Web'; import { apiClient } from '../services/api'; +import SettingsSelfhosted from '../models/Settings.default.basic.selfhosted'; +import SettingsSelfhostedPro from '../models/Settings.default.pro.selfhosted'; +import SettingsPro from '../models/Settings.default.pro'; const getWindowSize = function (fontSize: number): { width: number; height: number } { // returns window size in EM units @@ -101,6 +104,19 @@ const getOrigin = (network = 'mainnet'): Origin => { return origin; }; +const getSettings = (): Settings => { + let settings = new Settings(); + if (window.RobosatsSettings === 'selfhosted-basic') { + settings = new SettingsSelfhosted(); + } else if (window.RobosatsSettings === 'selfhosted-pro') { + settings = new SettingsSelfhostedPro(); + } else if (window.RobosatsSettings === 'web-pro') { + settings = new SettingsPro(); + } + + return settings; +}; + export interface WindowSize { width: number; height: number; @@ -140,7 +156,7 @@ export interface UseAppStoreType { export const initialAppContext: UseAppStoreType = { theme: undefined, torStatus: 'NOTINIT', - settings: new Settings(), + settings: getSettings(), setSettings: () => {}, page: entryPage, setPage: () => {}, @@ -175,7 +191,7 @@ export const AppContextProvider = ({ children }: AppContextProviderProps): JSX.E const hostUrl = initialAppContext.hostUrl; const origin = initialAppContext.origin; - const [settings, setSettings] = useState(initialAppContext.settings); + const [settings, setSettings] = useState(getSettings()); const [theme, setTheme] = useState(() => { return makeTheme(settings); }); diff --git a/frontend/src/models/Settings.default.basic.selfhosted.ts b/frontend/src/models/Settings.default.basic.selfhosted.ts index e8493e1e..9db4c295 100644 --- a/frontend/src/models/Settings.default.basic.selfhosted.ts +++ b/frontend/src/models/Settings.default.basic.selfhosted.ts @@ -1,7 +1,7 @@ import { systemClient } from '../services/System'; import BaseSettings from './Settings.model'; -class Settings extends BaseSettings { +class SettingsSelfhosted extends BaseSettings { constructor() { super(); const fontSizeCookie = systemClient.getItem('settings_fontsize_basic'); @@ -12,4 +12,4 @@ class Settings extends BaseSettings { public selfhostedClient: boolean = true; } -export default Settings; +export default SettingsSelfhosted; diff --git a/frontend/src/models/Settings.default.pro.selfhosted.ts b/frontend/src/models/Settings.default.pro.selfhosted.ts index f0af2805..aca5d300 100644 --- a/frontend/src/models/Settings.default.pro.selfhosted.ts +++ b/frontend/src/models/Settings.default.pro.selfhosted.ts @@ -1,7 +1,7 @@ import { systemClient } from '../services/System'; import BaseSettings from './Settings.model'; -class Settings extends BaseSettings { +class SettingsSelfhostedPro extends BaseSettings { constructor() { super(); const fontSizeCookie = systemClient.getItem('settings_fontsize_pro'); @@ -12,4 +12,4 @@ class Settings extends BaseSettings { public selfhostedClient: boolean = true; } -export default Settings; +export default SettingsSelfhostedPro; diff --git a/frontend/src/models/Settings.default.pro.ts b/frontend/src/models/Settings.default.pro.ts index 4b715313..2175406e 100644 --- a/frontend/src/models/Settings.default.pro.ts +++ b/frontend/src/models/Settings.default.pro.ts @@ -1,7 +1,7 @@ import { systemClient } from '../services/System'; import BaseSettings from './Settings.model'; -class Settings extends BaseSettings { +class SettingsPro extends BaseSettings { constructor() { super(); const fontSizeCookie = systemClient.getItem('settings_fontsize_pro'); @@ -11,4 +11,4 @@ class Settings extends BaseSettings { public frontend: 'basic' | 'pro' = 'pro'; } -export default Settings; +export default SettingsPro; diff --git a/frontend/src/services/Native/index.d.ts b/frontend/src/services/Native/index.d.ts index 3ef9c335..e93edd55 100644 --- a/frontend/src/services/Native/index.d.ts +++ b/frontend/src/services/Native/index.d.ts @@ -4,6 +4,7 @@ declare global { interface Window { ReactNativeWebView?: ReactNativeWebView; NativeRobosats?: NativeRobosats; + RobosatsSettings: 'web-basic' | 'web-pro' | 'selfhosted-basic' | 'selfhosted-pro'; } } diff --git a/frontend/webpack.config.ts b/frontend/webpack.config.ts index 51594f86..d3625542 100644 --- a/frontend/webpack.config.ts +++ b/frontend/webpack.config.ts @@ -32,93 +32,6 @@ const configWeb: Configuration = { }, }; -const configWebSelfhosted: Configuration = { - ...config, - module: { - ...config.module, - rules: [ - ...(config?.module?.rules || []), - { - test: path.resolve(__dirname, 'src/models/Settings.default.basic.ts'), - loader: 'file-replace-loader', - options: { - condition: 'if-replacement-exists', - replacement: path.resolve(__dirname, 'src/models/Settings.default.basic.selfhosted.ts'), - async: true, - }, - }, - ], - }, - output: { - path: path.resolve(__dirname, 'static/frontend'), - filename: 'basic.selfhosted.js', - }, -}; - -const configWebPro: Configuration = { - ...config, - module: { - ...config.module, - rules: [ - ...(config?.module?.rules || []), - { - test: path.resolve(__dirname, 'src/basic/Main.tsx'), - loader: 'file-replace-loader', - options: { - condition: 'if-replacement-exists', - replacement: path.resolve(__dirname, 'src/pro/Main.tsx'), - async: true, - }, - }, - { - test: path.resolve(__dirname, 'src/models/Settings.default.basic.ts'), - loader: 'file-replace-loader', - options: { - condition: 'if-replacement-exists', - replacement: path.resolve(__dirname, 'src/models/Settings.default.pro.ts'), - async: true, - }, - }, - ], - }, - output: { - path: path.resolve(__dirname, 'static/frontend'), - filename: 'pro.js', - }, -}; - -const configWebProSelfhosted: Configuration = { - ...config, - module: { - ...config.module, - rules: [ - ...(config?.module?.rules || []), - { - test: path.resolve(__dirname, 'src/basic/Main.tsx'), - loader: 'file-replace-loader', - options: { - condition: 'if-replacement-exists', - replacement: path.resolve(__dirname, 'src/pro/Main.tsx'), - async: true, - }, - }, - { - test: path.resolve(__dirname, 'src/models/Settings.default.basic.ts'), - loader: 'file-replace-loader', - options: { - condition: 'if-replacement-exists', - replacement: path.resolve(__dirname, 'src/models/Settings.default.pro.selfhosted.ts'), - async: true, - }, - }, - ], - }, - output: { - path: path.resolve(__dirname, 'static/frontend'), - filename: 'pro.selfhosted.js', - }, -}; - const configMobile: Configuration = { ...config, module: { @@ -177,4 +90,4 @@ const configMobile: Configuration = { }, }; -export default [configWeb, configWebPro, configWebSelfhosted, configWebProSelfhosted, configMobile]; +export default [configWeb, configMobile]; diff --git a/nodeapp/basic.html b/nodeapp/basic.html index 32af09a8..7034bd9b 100644 --- a/nodeapp/basic.html +++ b/nodeapp/basic.html @@ -55,6 +55,9 @@ - + + \ No newline at end of file diff --git a/nodeapp/pro.html b/nodeapp/pro.html index a582ac21..6e48a07a 100644 --- a/nodeapp/pro.html +++ b/nodeapp/pro.html @@ -57,6 +57,9 @@ - + + \ No newline at end of file diff --git a/web/basic.html b/web/basic.html index 99baef71..ffe6e35b 100644 --- a/web/basic.html +++ b/web/basic.html @@ -55,6 +55,9 @@ + \ No newline at end of file diff --git a/web/pro.html b/web/pro.html index 24292289..c75a0500 100644 --- a/web/pro.html +++ b/web/pro.html @@ -57,6 +57,9 @@ - + + \ No newline at end of file From b9c92fb1781edca704f400e00bed293790b9e5d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:32:44 +0000 Subject: [PATCH 02/42] Bump django-model-utils from 4.4.0 to 4.5.0 (#1222) Bumps [django-model-utils](https://github.com/jazzband/django-model-utils) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/jazzband/django-model-utils/releases) - [Changelog](https://github.com/jazzband/django-model-utils/blob/master/CHANGES.rst) - [Commits](https://github.com/jazzband/django-model-utils/compare/4.4.0...4.5.0) --- updated-dependencies: - dependency-name: django-model-utils dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7f6728d8..a02ec3d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ django==4.2.9 django-admin-relation-links==0.2.5 django-celery-beat==2.6.0 django-celery-results==2.5.1 -django-model-utils==4.4.0 +django-model-utils==4.5.0 django-redis==5.4.0 djangorestframework==3.15.0 channels==4.0.0 From 9479f35afa50b4c24b168d7af6769f4f17001d6e Mon Sep 17 00:00:00 2001 From: Aarav Mehta <32593731+aaravm@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:06:21 +0530 Subject: [PATCH 03/42] Fix coordinator chat env variable (#1232) changed env variable --- api/notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/notifications.py b/api/notifications.py index 67416266..02319197 100644 --- a/api/notifications.py +++ b/api/notifications.py @@ -139,7 +139,7 @@ class Telegram: text = f"⚖️ Hey {user.username}, a dispute has been opened on your order with ID {str(order.id)}." self.send_message(user.robot.telegram_chat_id, text) - admin_chat_id = config("TELEGRAM_ADMIN_CHAT_ID") + admin_chat_id = config("TELEGRAM_COORDINATOR_CHAT_ID") if len(admin_chat_id) == 0: return From 733f92277387c54a1412987f5bfaf47489dbb577 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:37:12 +0000 Subject: [PATCH 04/42] Bump @mui/x-date-pickers from 6.19.2 to 7.2.0 in /frontend (#1234) Bumps [@mui/x-date-pickers](https://github.com/mui/mui-x/tree/HEAD/packages/x-date-pickers) from 6.19.2 to 7.2.0. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.2.0/packages/x-date-pickers) --- updated-dependencies: - dependency-name: "@mui/x-date-pickers" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- frontend/package-lock.json | 159 +++++++++++++++++-------------------- frontend/package.json | 2 +- 2 files changed, 73 insertions(+), 88 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 65d2cbdf..40b0ba58 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -19,7 +19,7 @@ "@mui/material": "^5.15.9", "@mui/system": "^5.15.11", "@mui/x-data-grid": "^6.19.2", - "@mui/x-date-pickers": "^6.19.2", + "@mui/x-date-pickers": "^7.2.0", "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", "base-ex": "^0.8.1", @@ -1880,9 +1880,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2215,12 +2215,12 @@ } }, "node_modules/@floating-ui/dom": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.1.tgz", - "integrity": "sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", + "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.1" + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/react-dom": { @@ -2236,9 +2236,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", @@ -3106,9 +3106,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.9", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.9.tgz", - "integrity": "sha512-CSDpVevGaxsvMkiYBZ8ztki1z/eT0mM2MqUT21eCRiMz3DU4zQw5rXG5ML/yTuJF9Z2Wv9SliIeaRAuSR/9Nig==", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.15.tgz", + "integrity": "sha512-aXnw29OWQ6I5A47iuWEI6qSSUfH6G/aCsW9KmW3LiFqr7uXZBK4Ks+z8G+qeIub8k0T5CMqlT2q0L+ZJTMrqpg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" @@ -3181,16 +3181,16 @@ } }, "node_modules/@mui/material": { - "version": "5.15.9", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.9.tgz", - "integrity": "sha512-kbHTZDcFmN8GHKzRpImUEl9AJfFWI/0Kl+DsYVT3kHzQWUuHiKm3uHXR1RCOqr7H8IgHFPdbxItmCSQ/mj7zgg==", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.15.tgz", + "integrity": "sha512-3zvWayJ+E1kzoIsvwyEvkTUKVKt1AjchFFns+JtluHCuvxgKcLSRJTADw37k0doaRtVAsyh8bz9Afqzv+KYrIA==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.36", - "@mui/core-downloads-tracker": "^5.15.9", - "@mui/system": "^5.15.9", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.9", + "@mui/base": "5.0.0-beta.40", + "@mui/core-downloads-tracker": "^5.15.15", + "@mui/system": "^5.15.15", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", "@types/react-transition-group": "^4.4.10", "clsx": "^2.1.0", "csstype": "^3.1.3", @@ -3225,14 +3225,14 @@ } }, "node_modules/@mui/material/node_modules/@mui/base": { - "version": "5.0.0-beta.36", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.36.tgz", - "integrity": "sha512-6A8fYiXgjqTO6pgj31Hc8wm1M3rFYCxDRh09dBVk0L0W4cb2lnurRJa3cAyic6hHY+we1S58OdGYRbKmOsDpGQ==", + "version": "5.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", + "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", "dependencies": { "@babel/runtime": "^7.23.9", "@floating-ui/react-dom": "^2.0.8", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.9", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", "@popperjs/core": "^2.11.8", "clsx": "^2.1.0", "prop-types": "^15.8.1" @@ -3264,12 +3264,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.11.tgz", - "integrity": "sha512-jY/696SnSxSzO1u86Thym7ky5T9CgfidU3NFJjguldqK4f3Z5S97amZ6nffg8gTD0HBjY9scB+4ekqDEUmxZOA==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.11", + "@mui/utils": "^5.15.14", "prop-types": "^15.8.1" }, "engines": { @@ -3290,9 +3290,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", - "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", + "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", "dependencies": { "@babel/runtime": "^7.23.9", "@emotion/cache": "^11.11.0", @@ -3321,15 +3321,15 @@ } }, "node_modules/@mui/system": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.11.tgz", - "integrity": "sha512-9j35suLFq+MgJo5ktVSHPbkjDLRMBCV17NMBdEQurh6oWyGnLM4uhU4QGZZQ75o0vuhjJghOCA1jkO3+79wKsA==", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.11", - "@mui/styled-engine": "^5.15.11", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", + "@mui/private-theming": "^5.15.14", + "@mui/styled-engine": "^5.15.14", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", "clsx": "^2.1.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -3368,9 +3368,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.12", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.12.tgz", - "integrity": "sha512-3kaHiNm9khCAo0pVe0RenketDSFoZGAlVZ4zDjB/QNZV0XiCj+sh1zkX0VVhQPgYJDlBEzAag+MHJ1tU3vf0Zw==", + "version": "7.2.14", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", + "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -3381,9 +3381,9 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz", - "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", "dependencies": { "@babel/runtime": "^7.23.9", "@types/prop-types": "^15.7.11", @@ -3441,15 +3441,16 @@ } }, "node_modules/@mui/x-date-pickers": { - "version": "6.19.2", - "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-6.19.2.tgz", - "integrity": "sha512-/bdWZabexuz+1rKG15XryxiMGb5D0XVx65NU7CZYKm/1+HuUzc0FX9smKEa/YVZnLSNsAp6SULIyPZtAKE+3AA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.2.0.tgz", + "integrity": "sha512-hsXugZ+n1ZnHRYzf7+PFrjZ44T+FyGZmTreBmH0M2RUaAblgK+A1V3KNLT+r4Y9gJLH+92LwePxQ9xyfR+E51A==", "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/base": "^5.0.0-beta.20", - "@mui/utils": "^5.14.14", - "@types/react-transition-group": "^4.4.8", - "clsx": "^2.0.0", + "@babel/runtime": "^7.24.0", + "@mui/base": "^5.0.0-beta.40", + "@mui/system": "^5.15.14", + "@mui/utils": "^5.15.14", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", "prop-types": "^15.8.1", "react-transition-group": "^4.4.5" }, @@ -3458,14 +3459,13 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", - "@mui/material": "^5.8.6", - "@mui/system": "^5.8.0", - "date-fns": "^2.25.0", + "@mui/material": "^5.15.14", + "date-fns": "^2.25.0 || ^3.2.0", "date-fns-jalali": "^2.13.0-0", "dayjs": "^1.10.7", "luxon": "^3.0.2", @@ -3506,16 +3506,16 @@ } }, "node_modules/@mui/x-date-pickers/node_modules/@mui/base": { - "version": "5.0.0-beta.21", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.21.tgz", - "integrity": "sha512-eTKWx3WV/nwmRUK4z4K1MzlMyWCsi3WJ3RtV4DiXZeRh4qd4JCyp1Zzzi8Wv9xM4dEBmqQntFoei716PzwmFfA==", + "version": "5.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", + "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", "dependencies": { - "@babel/runtime": "^7.23.2", - "@floating-ui/react-dom": "^2.0.2", - "@mui/types": "^7.2.7", - "@mui/utils": "^5.14.15", + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", + "clsx": "^2.1.0", "prop-types": "^15.8.1" }, "engines": { @@ -3523,7 +3523,7 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0", @@ -3537,9 +3537,9 @@ } }, "node_modules/@mui/x-date-pickers/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } @@ -14222,21 +14222,6 @@ "resolved": "https://registry.npmjs.org/robo-identities-wasm/-/robo-identities-wasm-0.1.0.tgz", "integrity": "sha512-q6+1Vgq+8d2F5k8Nqm39qwQJYe9uTC7TlR3NbBQ6k2ImBNccdAEoZgb0ikKjN59cK4MvqejlgBV1ybaLXoHbhA==" }, - "node_modules/run-applescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", - "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index cba81b28..0003efc6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -58,7 +58,7 @@ "@mui/material": "^5.15.9", "@mui/system": "^5.15.11", "@mui/x-data-grid": "^6.19.2", - "@mui/x-date-pickers": "^6.19.2", + "@mui/x-date-pickers": "^7.2.0", "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", "base-ex": "^0.8.1", From 92c43993830ecedf1d5902c56b3ffdc2313af91e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:40:39 +0000 Subject: [PATCH 05/42] Bump country-flag-icons from 1.5.9 to 1.5.11 in /frontend (#1219) Bumps [country-flag-icons](https://gitlab.com/catamphetamine/country-flag-icons) from 1.5.9 to 1.5.11. - [Changelog](https://gitlab.com/catamphetamine/country-flag-icons/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/catamphetamine/country-flag-icons/compare/v1.5.9...v1.5.11) --- updated-dependencies: - dependency-name: country-flag-icons dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- frontend/package-lock.json | 8 ++++---- frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 40b0ba58..9de4dc02 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -23,7 +23,7 @@ "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", "base-ex": "^0.8.1", - "country-flag-icons": "^1.5.9", + "country-flag-icons": "^1.5.11", "date-fns": "^2.30.0", "file-replace-loader": "^1.4.0", "i18next": "^23.2.11", @@ -5840,9 +5840,9 @@ } }, "node_modules/country-flag-icons": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/country-flag-icons/-/country-flag-icons-1.5.9.tgz", - "integrity": "sha512-9jrjv2w7kRbqNtdtMdK2j3gmDIZzd5l9L2pZiQjF9J0mUcB+NKIGDNADTDHBEp8EQtjOkCOcciJGGSOpERdXPQ==" + "version": "1.5.11", + "resolved": "https://registry.npmjs.org/country-flag-icons/-/country-flag-icons-1.5.11.tgz", + "integrity": "sha512-B+mvFywunkRJs270k7kCBjhogvIA0uNn6GAXv6m2cPn3rrwqZzZVr2gBWcz+Cz7OGVWlcbERlYRIX0S6OGr8Bw==" }, "node_modules/create-require": { "version": "1.1.1", diff --git a/frontend/package.json b/frontend/package.json index 0003efc6..ce9271fb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -62,7 +62,7 @@ "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", "base-ex": "^0.8.1", - "country-flag-icons": "^1.5.9", + "country-flag-icons": "^1.5.11", "date-fns": "^2.30.0", "file-replace-loader": "^1.4.0", "i18next": "^23.2.11", From 9ae50948dd9466da697bd5e60bf0df76cd02655c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:41:13 +0000 Subject: [PATCH 06/42] Bump @mui/x-data-grid from 6.19.2 to 7.3.0 in /frontend (#1233) Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/x-data-grid) from 6.19.2 to 7.3.0. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.3.0/packages/x-data-grid) --- updated-dependencies: - dependency-name: "@mui/x-data-grid" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- frontend/package-lock.json | 26 +++++++++++++------------- frontend/package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9de4dc02..2a383e01 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -18,7 +18,7 @@ "@mui/lab": "^5.0.0-alpha.136", "@mui/material": "^5.15.9", "@mui/system": "^5.15.11", - "@mui/x-data-grid": "^6.19.2", + "@mui/x-data-grid": "^7.3.0", "@mui/x-date-pickers": "^7.2.0", "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", @@ -3408,13 +3408,14 @@ } }, "node_modules/@mui/x-data-grid": { - "version": "6.19.2", - "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-6.19.2.tgz", - "integrity": "sha512-+wizP1jEzCKB5BSQ6OD5TP6RspEbWmFWcxi1XBgKrzryUZii1o4G2BW1+d/n4p3xETCUMKRkYfItrOJGlM/dBw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-7.3.0.tgz", + "integrity": "sha512-IIDS6Yvxe+1eRj65q8cgnJg5yF2aIJYuHrY00W/UaFyjxwj3xSzqg3bdEfbjE2gHGS7lEJJbXSenPNGybzW99A==", "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/utils": "^5.14.16", - "clsx": "^2.0.0", + "@babel/runtime": "^7.24.0", + "@mui/system": "^5.15.14", + "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", "prop-types": "^15.8.1", "reselect": "^4.1.8" }, @@ -3423,19 +3424,18 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^5.4.1", - "@mui/system": "^5.4.1", + "@mui/material": "^5.15.14", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0" } }, "node_modules/@mui/x-data-grid/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } diff --git a/frontend/package.json b/frontend/package.json index ce9271fb..429130a5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -57,7 +57,7 @@ "@mui/lab": "^5.0.0-alpha.136", "@mui/material": "^5.15.9", "@mui/system": "^5.15.11", - "@mui/x-data-grid": "^6.19.2", + "@mui/x-data-grid": "^7.3.0", "@mui/x-date-pickers": "^7.2.0", "@nivo/core": "^0.85.1", "@nivo/line": "^0.85.1", From 471583733c6055a29b99d4e338559a4213a38c22 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sat, 20 Apr 2024 20:19:19 +0100 Subject: [PATCH 07/42] frontend: fix breaking MUI-X v7 changes --- frontend/package.json | 2 +- frontend/src/components/BookTable/index.tsx | 60 +++++++++++-------- .../src/components/MakerForm/MakerForm.tsx | 4 +- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 429130a5..77131dc9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -55,7 +55,7 @@ "@mui/base": "^5.0.0-beta.7", "@mui/icons-material": "^5.15.9", "@mui/lab": "^5.0.0-alpha.136", - "@mui/material": "^5.15.9", + "@mui/material": "^5.15.14", "@mui/system": "^5.15.11", "@mui/x-data-grid": "^7.3.0", "@mui/x-date-pickers": "^7.2.0", diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index eabb0068..453a35bf 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -24,6 +24,7 @@ import { type GridPaginationModel, type GridColDef, type GridValidRowModel, + GridSlotsComponent, } from '@mui/x-data-grid'; import currencyDict from '../../../static/assets/currencies.json'; import { type PublicOrder } from '../../models'; @@ -204,12 +205,12 @@ const BookTable = ({ renderCell: (params: any) => { return ( { onOrderClicked(params.row.id, params.row.coordinatorShortAlias); }} > - + - + ); }, @@ -236,7 +240,7 @@ const BookTable = ({ renderCell: (params: any) => { return (
{ onOrderClicked(params.row.id, params.row.coordinatorShortAlias); }} @@ -270,12 +274,12 @@ const BookTable = ({ renderCell: (params: any) => { return ( { onClickCoordinator(params.row.coordinatorShortAlias); }} > - + {currencyCode} -
- +
+ +
); }, @@ -386,12 +391,14 @@ const BookTable = ({ onOrderClicked(params.row.id, params.row.coordinatorShortAlias); }} > - +
+ +
); }, @@ -410,7 +417,8 @@ const BookTable = ({
{ @@ -545,7 +553,7 @@ const BookTable = ({ const minutes = Math.round((timeToExpiry - hours * (3600 * 1000)) / 60000); return ( { onOrderClicked(params.row.id, params.row.coordinatorShortAlias); }} @@ -880,19 +888,19 @@ const BookTable = ({ }; const gridComponents = useMemo(() => { - const components: GridComponentProps = { - LoadingOverlay: LinearProgress, + const components: GridSlotsComponent = { + loadingOverlay: LinearProgress, }; if (showNoResults) { - components.NoResultsOverlay = NoResultsOverlay; - components.NoRowsOverlay = NoResultsOverlay; + components.noResultsOverlay = NoResultsOverlay; + components.noRowsOverlay = NoResultsOverlay; } if (showFooter) { - components.Footer = Footer; + components.footer = Footer; } if (showControls) { - components.Toolbar = BookControl; + components.toolbar = BookControl; } return components; }, [showNoResults, showFooter, showControls, fullscreen]); @@ -930,8 +938,8 @@ const BookTable = ({ setColumnVisibilityModel(newColumnVisibilityModel); }} hideFooter={!showFooter} - components={gridComponents} - componentsProps={{ + slots={gridComponents} + slotProps={{ toolbar: { width, paymentMethod: paymentMethods, @@ -966,12 +974,12 @@ const BookTable = ({ loading={federation.loading} columns={columns} hideFooter={!showFooter} - components={gridComponents} + slots={gridComponents} columnVisibilityModel={columnVisibilityModel} onColumnVisibilityModelChange={(newColumnVisibilityModel) => { setColumnVisibilityModel(newColumnVisibilityModel); }} - componentsProps={{ + slotProps={{ toolbar: { width, paymentMethod: paymentMethods, diff --git a/frontend/src/components/MakerForm/MakerForm.tsx b/frontend/src/components/MakerForm/MakerForm.tsx index d9645b72..c2ee6d6a 100644 --- a/frontend/src/components/MakerForm/MakerForm.tsx +++ b/frontend/src/components/MakerForm/MakerForm.tsx @@ -1028,7 +1028,7 @@ const MakerForm = ({ views={['hours', 'minutes']} inputFormat='HH:mm' mask='__:__' - componentsProps={{ + slotProps={{ textField: { InputProps: { style: { @@ -1061,7 +1061,7 @@ const MakerForm = ({ views={['hours', 'minutes']} inputFormat='HH:mm' mask='__:__' - componentsProps={{ + slotProps={{ textField: { InputProps: { style: { From 5f4696380e99790ea16215128d4c52154e0a9a70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:37:15 +0000 Subject: [PATCH 08/42] Bump typescript from 5.3.3 to 5.4.5 in /mobile (#1229) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- mobile/package-lock.json | 8 ++++---- mobile/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/package-lock.json b/mobile/package-lock.json index 4c2f51d1..c6937a7f 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -40,7 +40,7 @@ "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", "react-test-renderer": "18.2.0", - "typescript": "^5.3.3" + "typescript": "^5.4.5" } }, "node_modules/@ampproject/remapping": { @@ -14107,9 +14107,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/mobile/package.json b/mobile/package.json index f8faced3..40153d73 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -44,7 +44,7 @@ "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", "react-test-renderer": "18.2.0", - "typescript": "^5.3.3" + "typescript": "^5.4.5" }, "resolutions": { "@types/react": "^18" From 30c1794ba88214358784dd1b6f37e7cfe3d0322e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:37:58 +0000 Subject: [PATCH 09/42] Bump python from 3.11.8-slim-bookworm to 3.11.9-slim-bookworm (#1226) Bumps python from 3.11.8-slim-bookworm to 3.11.9-slim-bookworm. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0695ae7d..50165266 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.8-slim-bookworm +FROM python:3.11.9-slim-bookworm ARG DEBIAN_FRONTEND=noninteractive ARG DEVELOPMENT=False From 3f5d62833ff3fef01d7bd0ab2d127fd568dba418 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:38:25 +0000 Subject: [PATCH 10/42] Bump channels from 4.0.0 to 4.1.0 (#1223) Bumps [channels](https://github.com/django/channels) from 4.0.0 to 4.1.0. - [Changelog](https://github.com/django/channels/blob/main/CHANGELOG.txt) - [Commits](https://github.com/django/channels/compare/4.0.0...4.1.0) --- updated-dependencies: - dependency-name: channels dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a02ec3d6..58bbca0f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ django-celery-results==2.5.1 django-model-utils==4.5.0 django-redis==5.4.0 djangorestframework==3.15.0 -channels==4.0.0 +channels==4.1.0 channels-redis==4.2.0 celery==5.3.6 grpcio==1.62.0 From 70b60edd8a6a52150991f2d33be378f8ff7bf8ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:38:45 +0000 Subject: [PATCH 11/42] Bump drf-spectacular-sidecar from 2024.3.4 to 2024.4.1 (#1225) Bumps [drf-spectacular-sidecar](https://github.com/tfranzel/drf-spectacular-sidecar) from 2024.3.4 to 2024.4.1. - [Commits](https://github.com/tfranzel/drf-spectacular-sidecar/compare/2024.3.4...2024.4.1) --- updated-dependencies: - dependency-name: drf-spectacular-sidecar dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 58bbca0f..52485e99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,6 +25,6 @@ requests[socks] python-gnupg==0.5.2 daphne==4.1.0 drf-spectacular==0.27.1 -drf-spectacular-sidecar==2024.3.4 +drf-spectacular-sidecar==2024.4.1 django-cors-headers==4.3.1 base91==1.0.1 From 92d7bcd5c3f0a7333d3be5afa04e63f2058006c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:39:11 +0000 Subject: [PATCH 12/42] Bump jest and @types/jest in /mobile (#1221) Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together. Updates `jest` from 29.5.0 to 29.7.0 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest) Updates `@types/jest` from 29.5.1 to 29.5.12 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- mobile/package-lock.json | 1454 ++++++++++++++++++++++++-------------- mobile/package.json | 4 +- 2 files changed, 910 insertions(+), 548 deletions(-) diff --git a/mobile/package-lock.json b/mobile/package-lock.json index c6937a7f..a98f3056 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -20,7 +20,7 @@ "@babel/core": "^7.21.4", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^3.2.0", - "@types/jest": "^29.5.1", + "@types/jest": "^29.5.12", "@types/react-native": "^0.71.3", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.59.2", @@ -36,7 +36,7 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "jest": "^29.5.0", + "jest": "^29.7.0", "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", "react-test-renderer": "18.2.0", @@ -55,41 +55,45 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "license": "MIT", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.21.9", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.8", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.5", - "@babel/helper-compilation-targets": "^7.21.5", - "@babel/helper-module-transforms": "^7.21.5", - "@babel/helpers": "^7.21.5", - "@babel/parser": "^7.21.8", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.5", - "@babel/types": "^7.21.5", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -117,12 +121,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.9", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dependencies": { - "@babel/types": "^7.21.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -151,20 +156,18 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.21.5", - "license": "MIT", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dependencies": { - "@babel/compat-data": "^7.21.5", - "@babel/helper-validator-option": "^7.21.0", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-create-class-features-plugin": { @@ -219,28 +222,31 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.21.5", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -257,30 +263,32 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.21.4", - "license": "MIT", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dependencies": { - "@babel/types": "^7.21.4" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.5", - "license": "MIT", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dependencies": { - "@babel/helper-environment-visitor": "^7.21.5", - "@babel/helper-module-imports": "^7.21.4", - "@babel/helper-simple-access": "^7.21.5", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.5", - "@babel/types": "^7.21.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { @@ -332,10 +340,11 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.21.5", - "license": "MIT", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dependencies": { - "@babel/types": "^7.21.5" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -352,32 +361,36 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "license": "MIT", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.21.5", - "license": "MIT", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "license": "MIT", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "engines": { "node": ">=6.9.0" } @@ -396,32 +409,36 @@ } }, "node_modules/@babel/helpers": { - "version": "7.21.5", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.5", - "@babel/types": "^7.21.5" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "license": "MIT", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.21.9", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1691,30 +1708,32 @@ } }, "node_modules/@babel/template": { - "version": "7.21.9", - "license": "MIT", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/parser": "^7.21.9", - "@babel/types": "^7.21.5" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.5", - "license": "MIT", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.5", - "@babel/helper-environment-visitor": "^7.21.5", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.5", - "@babel/types": "^7.21.5", - "debug": "^4.1.0", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1722,11 +1741,12 @@ } }, "node_modules/@babel/types": { - "version": "7.21.5", - "license": "MIT", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dependencies": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1735,8 +1755,9 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", @@ -1907,15 +1928,16 @@ } }, "node_modules/@jest/console": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -1924,8 +1946,9 @@ }, "node_modules/@jest/console/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1938,8 +1961,9 @@ }, "node_modules/@jest/console/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1953,8 +1977,9 @@ }, "node_modules/@jest/console/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1964,21 +1989,24 @@ }, "node_modules/@jest/console/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/console/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/console/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1987,36 +2015,37 @@ } }, "node_modules/@jest/core": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^29.5.0", - "@jest/reporters": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-resolve-dependencies": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "jest-watcher": "^29.5.0", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -2034,8 +2063,9 @@ }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2048,8 +2078,9 @@ }, "node_modules/@jest/core/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2063,8 +2094,9 @@ }, "node_modules/@jest/core/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2074,21 +2106,24 @@ }, "node_modules/@jest/core/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/core/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2107,81 +2142,87 @@ } }, "node_modules/@jest/environment": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dependencies": { - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.5.0" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, - "license": "MIT", "dependencies": { - "expect": "^29.5.0", - "jest-snapshot": "^29.5.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, - "license": "MIT", "dependencies": { - "jest-get-type": "^29.4.3" + "jest-get-type": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/types": "^29.5.0", - "jest-mock": "^29.5.0" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, - "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -2189,13 +2230,13 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "jest-worker": "^29.5.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -2215,8 +2256,9 @@ }, "node_modules/@jest/reporters/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2229,8 +2271,9 @@ }, "node_modules/@jest/reporters/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2244,8 +2287,9 @@ }, "node_modules/@jest/reporters/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2255,21 +2299,67 @@ }, "node_modules/@jest/reporters/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/reporters/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2277,6 +2367,12 @@ "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -2289,11 +2385,12 @@ } }, "node_modules/@jest/source-map": { - "version": "29.4.3", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -2302,12 +2399,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -2316,13 +2414,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^29.5.0", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -2400,11 +2499,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@jest/transform/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@jest/transform/node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -2499,12 +2593,13 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "license": "MIT", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -2518,8 +2613,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } @@ -2537,17 +2633,14 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "license": "MIT", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "license": "MIT" - }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "dev": true, @@ -4222,15 +4315,17 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "license": "BSD-3-Clause", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.2.0", - "license": "BSD-3-Clause", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -4306,9 +4401,10 @@ } }, "node_modules/@types/jest": { - "version": "29.5.1", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -4328,11 +4424,6 @@ "version": "20.2.3", "license": "MIT" }, - "node_modules/@types/prettier": { - "version": "2.7.2", - "dev": true, - "license": "MIT" - }, "node_modules/@types/prop-types": { "version": "15.7.5", "dev": true, @@ -4734,8 +4825,9 @@ }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -5319,7 +5411,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.5", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "funding": [ { "type": "opencollective", @@ -5328,14 +5422,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -5510,7 +5607,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001489", + "version": "1.0.30001606", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001606.tgz", + "integrity": "sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg==", "funding": [ { "type": "opencollective", @@ -5524,12 +5623,12 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/chalk": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -5541,8 +5640,9 @@ }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -5561,9 +5661,10 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "dev": true, - "license": "MIT" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true }, "node_modules/class-utils": { "version": "0.3.6", @@ -5700,17 +5801,19 @@ }, "node_modules/co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "dev": true, - "license": "MIT" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true }, "node_modules/collection-visit": { "version": "1.0.0", @@ -5823,8 +5926,9 @@ "license": "MIT" }, "node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/copy-descriptor": { "version": "0.1.1", @@ -5890,6 +5994,97 @@ "node": ">=4" } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/create-jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/create-jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/create-jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "dev": true, @@ -5942,9 +6137,18 @@ } }, "node_modules/dedent": { - "version": "0.7.0", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", "dev": true, - "license": "MIT" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -5953,8 +6157,9 @@ }, "node_modules/deepmerge": { "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6181,16 +6386,18 @@ }, "node_modules/detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/diff-sequences": { - "version": "29.4.3", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -6222,13 +6429,15 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.404", - "license": "ISC" + "version": "1.4.729", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.729.tgz", + "integrity": "sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA==" }, "node_modules/emittery": { "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -7244,6 +7453,8 @@ }, "node_modules/exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -7363,15 +7574,16 @@ "license": "MIT" }, "node_modules/expect": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -7970,7 +8182,8 @@ }, "node_modules/has-flag": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } @@ -8105,8 +8318,9 @@ }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-errors": { "version": "2.0.0", @@ -8198,8 +8412,9 @@ }, "node_modules/import-local": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -8420,8 +8635,9 @@ }, "node_modules/is-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -8669,30 +8885,33 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8702,8 +8921,9 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -8714,9 +8934,10 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -8726,14 +8947,15 @@ } }, "node_modules/jest": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.5.0" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -8751,11 +8973,13 @@ } }, "node_modules/jest-changed-files": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, - "license": "MIT", "dependencies": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, "engines": { @@ -8763,27 +8987,28 @@ } }, "node_modules/jest-circus": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.5.0", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.5.0", + "pretty-format": "^29.7.0", "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" @@ -8794,8 +9019,9 @@ }, "node_modules/jest-circus/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -8808,8 +9034,9 @@ }, "node_modules/jest-circus/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8823,8 +9050,9 @@ }, "node_modules/jest-circus/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -8834,21 +9062,24 @@ }, "node_modules/jest-circus/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-circus/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-circus/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8857,21 +9088,21 @@ } }, "node_modules/jest-cli": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "bin": { @@ -8891,8 +9122,9 @@ }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -8905,8 +9137,9 @@ }, "node_modules/jest-cli/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8920,8 +9153,9 @@ }, "node_modules/jest-cli/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -8931,21 +9165,24 @@ }, "node_modules/jest-cli/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-cli/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-cli/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8954,30 +9191,31 @@ } }, "node_modules/jest-config": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.5.0", - "@jest/types": "^29.5.0", - "babel-jest": "^29.5.0", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.5.0", - "jest-environment-node": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.5.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -8999,8 +9237,9 @@ }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9013,8 +9252,9 @@ }, "node_modules/jest-config/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9028,8 +9268,9 @@ }, "node_modules/jest-config/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9039,21 +9280,24 @@ }, "node_modules/jest-config/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-config/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9062,14 +9306,15 @@ } }, "node_modules/jest-diff": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9077,8 +9322,9 @@ }, "node_modules/jest-diff/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9091,8 +9337,9 @@ }, "node_modules/jest-diff/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9106,8 +9353,9 @@ }, "node_modules/jest-diff/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9117,21 +9365,24 @@ }, "node_modules/jest-diff/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-diff/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-diff/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9140,9 +9391,10 @@ } }, "node_modules/jest-docblock": { - "version": "29.4.3", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, - "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -9151,15 +9403,16 @@ } }, "node_modules/jest-each": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.5.0", - "pretty-format": "^29.5.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9167,8 +9420,9 @@ }, "node_modules/jest-each/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9181,8 +9435,9 @@ }, "node_modules/jest-each/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9196,8 +9451,9 @@ }, "node_modules/jest-each/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9207,21 +9463,24 @@ }, "node_modules/jest-each/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-each/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-each/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9230,24 +9489,26 @@ } }, "node_modules/jest-environment-node": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.4.3", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -9278,26 +9539,28 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, - "license": "MIT", "dependencies": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9368,16 +9631,17 @@ } }, "node_modules/jest-message-util": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -9444,12 +9708,13 @@ } }, "node_modules/jest-mock": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.5.0" + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9457,8 +9722,9 @@ }, "node_modules/jest-pnp-resolver": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -9481,16 +9747,17 @@ } }, "node_modules/jest-resolve": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" @@ -9500,12 +9767,13 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, - "license": "MIT", "dependencies": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.5.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9513,8 +9781,9 @@ }, "node_modules/jest-resolve/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9527,8 +9796,9 @@ }, "node_modules/jest-resolve/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9542,8 +9812,9 @@ }, "node_modules/jest-resolve/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9553,21 +9824,24 @@ }, "node_modules/jest-resolve/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-resolve/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-resolve/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9576,29 +9850,30 @@ } }, "node_modules/jest-runner": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^29.5.0", - "@jest/environment": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-leak-detector": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-resolve": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-util": "^29.5.0", - "jest-watcher": "^29.5.0", - "jest-worker": "^29.5.0", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -9608,8 +9883,9 @@ }, "node_modules/jest-runner/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9622,8 +9898,9 @@ }, "node_modules/jest-runner/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9637,8 +9914,9 @@ }, "node_modules/jest-runner/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9648,21 +9926,24 @@ }, "node_modules/jest-runner/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-runner/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-runner/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9671,30 +9952,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/globals": "^29.5.0", - "@jest/source-map": "^29.4.3", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -9704,8 +9986,9 @@ }, "node_modules/jest-runtime/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9718,8 +10001,9 @@ }, "node_modules/jest-runtime/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9733,8 +10017,9 @@ }, "node_modules/jest-runtime/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9744,21 +10029,24 @@ }, "node_modules/jest-runtime/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-runtime/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-runtime/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9778,33 +10066,31 @@ } }, "node_modules/jest-snapshot": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.5.0", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.5.0", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9812,8 +10098,9 @@ }, "node_modules/jest-snapshot/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9826,8 +10113,9 @@ }, "node_modules/jest-snapshot/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9841,8 +10129,9 @@ }, "node_modules/jest-snapshot/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9852,21 +10141,24 @@ }, "node_modules/jest-snapshot/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-snapshot/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-snapshot/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -9875,9 +10167,10 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.1", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9890,8 +10183,9 @@ }, "node_modules/jest-snapshot/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9901,8 +10195,9 @@ }, "node_modules/jest-snapshot/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/jest-util": { "version": "29.7.0", @@ -9979,16 +10274,17 @@ } }, "node_modules/jest-validate": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^29.5.0", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.5.0" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -9996,8 +10292,9 @@ }, "node_modules/jest-validate/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10010,8 +10307,9 @@ }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -10021,8 +10319,9 @@ }, "node_modules/jest-validate/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10036,8 +10335,9 @@ }, "node_modules/jest-validate/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10047,21 +10347,24 @@ }, "node_modules/jest-validate/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-validate/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-validate/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10070,17 +10373,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.5.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", - "jest-util": "^29.5.0", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { @@ -10089,8 +10393,9 @@ }, "node_modules/jest-watcher/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10103,8 +10408,9 @@ }, "node_modules/jest-watcher/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10118,8 +10424,9 @@ }, "node_modules/jest-watcher/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10129,21 +10436,24 @@ }, "node_modules/jest-watcher/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-watcher/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-watcher/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10464,8 +10774,9 @@ }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -10541,8 +10852,9 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/locate-path": { "version": "5.0.0", @@ -10757,19 +11069,53 @@ } }, "node_modules/make-dir": { - "version": "3.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/makeerror": { "version": "1.0.12", "license": "BSD-3-Clause", @@ -11811,8 +12157,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.11", - "license": "MIT" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/node-stream-zip": { "version": "1.15.0", @@ -12251,8 +12598,9 @@ }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -12344,8 +12692,9 @@ }, "node_modules/pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -12395,10 +12744,11 @@ } }, "node_modules/pretty-format": { - "version": "29.5.0", - "license": "MIT", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dependencies": { - "@jest/schemas": "^29.4.3", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -12468,7 +12818,9 @@ } }, "node_modules/pure-rand": { - "version": "6.0.2", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", "dev": true, "funding": [ { @@ -12479,8 +12831,7 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ], - "license": "MIT" + ] }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -12945,8 +13296,9 @@ }, "node_modules/resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -12968,8 +13320,9 @@ }, "node_modules/resolve.exports": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -13083,8 +13436,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "license": "ISC", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -13470,8 +13824,9 @@ }, "node_modules/source-map-support": { "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -13647,8 +14002,9 @@ }, "node_modules/string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -13753,8 +14109,9 @@ }, "node_modules/strip-bom": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -13795,7 +14152,8 @@ }, "node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -14077,15 +14435,17 @@ }, "node_modules/type-detect": { "version": "4.0.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -14267,7 +14627,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "funding": [ { "type": "opencollective", @@ -14282,7 +14644,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -14332,13 +14693,14 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.1.0", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" diff --git a/mobile/package.json b/mobile/package.json index 40153d73..c213d06d 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -24,7 +24,7 @@ "@babel/core": "^7.21.4", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^3.2.0", - "@types/jest": "^29.5.1", + "@types/jest": "^29.5.12", "@types/react-native": "^0.71.3", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.59.2", @@ -40,7 +40,7 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "jest": "^29.5.0", + "jest": "^29.7.0", "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", "react-test-renderer": "18.2.0", From 29611663936975d45f584ed1f3cc64d4a1ccd9e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:40:22 +0000 Subject: [PATCH 13/42] Bump drf-spectacular from 0.27.1 to 0.27.2 (#1224) Bumps [drf-spectacular](https://github.com/tfranzel/drf-spectacular) from 0.27.1 to 0.27.2. - [Release notes](https://github.com/tfranzel/drf-spectacular/releases) - [Changelog](https://github.com/tfranzel/drf-spectacular/blob/master/CHANGELOG.rst) - [Commits](https://github.com/tfranzel/drf-spectacular/compare/0.27.1...0.27.2) --- updated-dependencies: - dependency-name: drf-spectacular dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 52485e99..e8f7155a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ django-import-export==3.3.7 requests[socks] python-gnupg==0.5.2 daphne==4.1.0 -drf-spectacular==0.27.1 +drf-spectacular==0.27.2 drf-spectacular-sidecar==2024.4.1 django-cors-headers==4.3.1 base91==1.0.1 From eb1060d3a6213921f22b29f953b685aa1553c0bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:41:34 +0000 Subject: [PATCH 14/42] Bump i18next-browser-languagedetector from 7.2.0 to 7.2.1 in /frontend (#1218) Bumps [i18next-browser-languagedetector](https://github.com/i18next/i18next-browser-languageDetector) from 7.2.0 to 7.2.1. - [Changelog](https://github.com/i18next/i18next-browser-languageDetector/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next-browser-languageDetector/compare/v7.2.0...v7.2.1) --- updated-dependencies: - dependency-name: i18next-browser-languagedetector dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- frontend/package-lock.json | 8 ++++---- frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2a383e01..33ee268c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -27,7 +27,7 @@ "date-fns": "^2.30.0", "file-replace-loader": "^1.4.0", "i18next": "^23.2.11", - "i18next-browser-languagedetector": "^7.2.0", + "i18next-browser-languagedetector": "^7.2.1", "i18next-http-backend": "^2.5.0", "install": "^0.13.0", "js-sha256": "^0.11.0", @@ -7873,9 +7873,9 @@ } }, "node_modules/i18next-browser-languagedetector": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.2.0.tgz", - "integrity": "sha512-U00DbDtFIYD3wkWsr2aVGfXGAj2TgnELzOX9qv8bT0aJtvPV9CRO77h+vgmHFBMe7LAxdwvT/7VkCWGya6L3tA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.2.1.tgz", + "integrity": "sha512-h/pM34bcH6tbz8WgGXcmWauNpQupCGr25XPp9cZwZInR9XHSjIFDYp1SIok7zSPsTOMxdvuLyu86V+g2Kycnfw==", "dependencies": { "@babel/runtime": "^7.23.2" } diff --git a/frontend/package.json b/frontend/package.json index 77131dc9..cb70fdf2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -66,7 +66,7 @@ "date-fns": "^2.30.0", "file-replace-loader": "^1.4.0", "i18next": "^23.2.11", - "i18next-browser-languagedetector": "^7.2.0", + "i18next-browser-languagedetector": "^7.2.1", "i18next-http-backend": "^2.5.0", "install": "^0.13.0", "js-sha256": "^0.11.0", From 7375e1dfb3f50267a2645704fb95d92d87e65ce5 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sat, 20 Apr 2024 20:44:16 +0100 Subject: [PATCH 15/42] chore: explain monorepo architecture on readme.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 8d85848e..5f5b8f7c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,17 @@ Alice wants to buy satoshis privately: ## Contribute to the Robotic Satoshis Open Source Project Check out our [Contribution Guide](https://learn.robosats.com/contribute/) to find how you can make RoboSats great. +RoboSats is a monorepo, arguably a messy one at the moment. + - The top level is a Django application (the coordinator backend) with apps `/api`, `/control`, and `/chat`. Django settings are in `/robosats` and `/tests` has integration tests for the RoboSats backend. + - The `/frontend` directory contains the ReactJS client. + - The `/nodeapp` directory contains the docker orchestration and utilities for the self-hosted application (Umbrel, StartOS, etc) + - The `/mobile` directory contains our React Native app (a wrapper around our ReactJS app in `/frontend`) + - The `/docs` directory has the learn.robosats.com static Jekyll site markdown docs. + - The `/web` directory is a light wrapper around our client app `/frontend` intended to host a RoboSats dex client to be used for the public. We use this one in dex.robosats.com + +You can run the whole stack for local development following the instructions in [setup.md](/setup.md) + +Officially mantained docker orchestration for coordinators can be found in the repo [robosats-deploy](https://github.com/RoboSats/robosats-deploy) ### ⚡Developer Rewards ⚡ Check out the [Developer Rewards Panel](https://github.com/users/Reckless-Satoshi/projects/2/views/5) for tasks paid in Sats. From 9029f3390fdd43a56ea5f28aa731656a2eccca24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:32:35 +0000 Subject: [PATCH 16/42] Bump django-import-export from 3.3.7 to 3.3.8 (#1240) Bumps [django-import-export](https://github.com/django-import-export/django-import-export) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/django-import-export/django-import-export/releases) - [Changelog](https://github.com/django-import-export/django-import-export/blob/main/docs/changelog.rst) - [Commits](https://github.com/django-import-export/django-import-export/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: django-import-export dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e8f7155a..c48f44cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ git+https://github.com/RoboSats/Robohash.git gunicorn==21.2.0 psycopg2==2.9.9 SQLAlchemy==2.0.16 -django-import-export==3.3.7 +django-import-export==3.3.8 requests[socks] python-gnupg==0.5.2 daphne==4.1.0 From 87e53013ebdc7397c96a833e1d87037e4d022836 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:32:55 +0000 Subject: [PATCH 17/42] Bump gunicorn from 21.2.0 to 22.0.0 (#1239) Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 21.2.0 to 22.0.0. - [Release notes](https://github.com/benoitc/gunicorn/releases) - [Commits](https://github.com/benoitc/gunicorn/compare/21.2.0...22.0.0) --- updated-dependencies: - dependency-name: gunicorn dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c48f44cf..a6c0f284 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ python-decouple==3.8 requests==2.31.0 ring==0.10.1 git+https://github.com/RoboSats/Robohash.git -gunicorn==21.2.0 +gunicorn==22.0.0 psycopg2==2.9.9 SQLAlchemy==2.0.16 django-import-export==3.3.8 From 460bb90ed61e11d25ef975a8d98c4a2a735f2afc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:33:21 +0000 Subject: [PATCH 18/42] Bump celery from 5.3.6 to 5.4.0 (#1238) Bumps [celery](https://github.com/celery/celery) from 5.3.6 to 5.4.0. - [Release notes](https://github.com/celery/celery/releases) - [Changelog](https://github.com/celery/celery/blob/main/Changelog.rst) - [Commits](https://github.com/celery/celery/compare/v5.3.6...v5.4.0) --- updated-dependencies: - dependency-name: celery dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a6c0f284..25ade925 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ django-redis==5.4.0 djangorestframework==3.15.0 channels==4.1.0 channels-redis==4.2.0 -celery==5.3.6 +celery==5.4.0 grpcio==1.62.0 googleapis-common-protos==1.63.0 grpcio-tools==1.62.0 From 013ba8784ea386231755a5f3ddf4a2e68db29069 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:34:28 +0000 Subject: [PATCH 19/42] Bump pre-commit from 3.6.2 to 3.7.0 (#1215) Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.6.2 to 3.7.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.6.2...v3.7.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 1cf43c82..1783a603 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,4 +1,4 @@ coverage==7.4.4 ruff==0.3.4 drf-openapi-tester==2.3.3 -pre-commit==3.6.2 \ No newline at end of file +pre-commit==3.7.0 \ No newline at end of file From 5f7e26b052096af7e79e9c4c757940178671970b Mon Sep 17 00:00:00 2001 From: NIDHI SHARMA <114356358+Nidhi-Sharma9419@users.noreply.github.com> Date: Mon, 22 Apr 2024 01:05:31 +0530 Subject: [PATCH 20/42] Fix(frontend): sats sent/receive for swaps is corrected (#1241) Fixes #1201 --- frontend/src/utils/computeSats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/computeSats.ts b/frontend/src/utils/computeSats.ts index ca870531..a76deeda 100644 --- a/frontend/src/utils/computeSats.ts +++ b/frontend/src/utils/computeSats.ts @@ -16,7 +16,7 @@ const computeSats = ({ }: computeSatsProps): string | undefined => { const rateWithPremium = rate + premium / 100; let sats = (amount / rateWithPremium) * 100000000; - sats = sats * (1 + fee) * (1 - routingBudget); + sats = sats * (1 - fee) * (1 - routingBudget); return pn(Math.round(sats)); }; From 94d54aa32873aa73cbdb7bd473c752d356267fbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 20:23:26 +0000 Subject: [PATCH 21/42] Bump django from 4.2.9 to 5.0.4 (#1237) Bumps [django](https://github.com/django/django) from 4.2.9 to 5.0.4. - [Commits](https://github.com/django/django/compare/4.2.9...5.0.4) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 25ade925..3fdd9276 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -django==4.2.9 +django==5.0.4 django-admin-relation-links==0.2.5 django-celery-beat==2.6.0 django-celery-results==2.5.1 From c4c5eb12680276fe43769fcd579da9ade37d75b9 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 21 Apr 2024 21:52:13 +0100 Subject: [PATCH 22/42] chore(coordinator): bump python to 3.12 --- .github/workflows/integration-tests.yml | 6 +++--- Dockerfile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a77f816c..021f8d76 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -20,9 +20,9 @@ jobs: strategy: max-parallel: 2 matrix: - python-tag: ['3.11.6-slim-bookworm', '3.12.1-slim-bookworm'] - lnd-version: ['v0.17.3-beta'] - cln-version: ['v23.11.2'] + python-tag: ['3.12.3-slim-bookworm', '3.13-rc-slim-bookworm'] + lnd-version: ['v0.17.4-beta'] + cln-version: ['v23.11.2','v24.02'] ln-vendor: ['LND'] #, 'CLN'] steps: diff --git a/Dockerfile b/Dockerfile index 50165266..9490504e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.9-slim-bookworm +FROM python:3.12.3-slim-bookworm ARG DEBIAN_FRONTEND=noninteractive ARG DEVELOPMENT=False From ee9b7147e901f1c395eae379b4059db410d002aa Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 21 Apr 2024 22:09:06 +0100 Subject: [PATCH 23/42] fix(coordinator): warning on drf serialializer decimal --- api/serializers.py | 3 ++- chat/serializers.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/serializers.py b/api/serializers.py index 950eaf95..6094e600 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -1,4 +1,5 @@ from decouple import config +from decimal import Decimal from rest_framework import serializers from .models import MarketTick, Order @@ -583,7 +584,7 @@ class UpdateOrderSerializer(serializers.Serializer): ) routing_budget_ppm = serializers.IntegerField( default=0, - min_value=0, + min_value=Decimal(0), max_value=100_001, allow_null=True, required=False, diff --git a/chat/serializers.py b/chat/serializers.py index a857b786..172abcf5 100644 --- a/chat/serializers.py +++ b/chat/serializers.py @@ -1,5 +1,5 @@ from rest_framework import serializers - +from decimal import Decimal from chat.models import Message @@ -36,7 +36,7 @@ class ChatSerializer(serializers.ModelSerializer): allow_null=True, default=None, required=False, - min_value=0, + min_value=Decimal(0), help_text="Offset for message index to get as response", ) @@ -66,7 +66,7 @@ class PostMessageSerializer(serializers.ModelSerializer): order_id = serializers.IntegerField( required=True, - min_value=0, + min_value=Decimal(0), help_text="Your peer's public key", ) @@ -74,7 +74,7 @@ class PostMessageSerializer(serializers.ModelSerializer): allow_null=True, default=None, required=False, - min_value=0, + min_value=Decimal(0), help_text="Offset for message index to get as response", ) From f0385f804029799a05e5c59570859f48a189d7e5 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 21 Apr 2024 22:16:35 +0100 Subject: [PATCH 24/42] fix(frontend): column header visibility of tables in mobile mui-x v7 --- frontend/src/components/BookTable/index.tsx | 22 ++--------------- frontend/src/components/DataGrid/HeaderFix.ts | 24 +++++++++++++++++++ .../src/components/FederationTable/index.tsx | 2 ++ 3 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 frontend/src/components/DataGrid/HeaderFix.ts diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index 453a35bf..9aa0d94b 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -39,31 +39,13 @@ import RobotAvatar from '../RobotAvatar'; import { Fullscreen, FullscreenExit, Refresh } from '@mui/icons-material'; import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext'; +import headerStyleFix from '../DataGrid/HeaderFix'; const ClickThroughDataGrid = styled(DataGrid)({ '& .MuiDataGrid-overlayWrapperInner': { pointerEvents: 'none', }, - // Temporary fix for regression for hidden column labels on Mobile: - // https://github.com/mui/mui-x/issues/9776#issuecomment-1648306844 - '@media (hover: none)': { - '&& .MuiDataGrid-menuIcon': { - width: 0, - visibility: 'hidden', - }, - '&& .MuiDataGrid-sortIcon': { - width: 0, - visibility: 'hidden', - }, - }, - '&& .MuiDataGrid-columnHeader--sorted .MuiDataGrid-menuIcon': { - width: 'auto', - visibility: 'visible', - }, - '&& .MuiDataGrid-columnHeader--sorted .MuiDataGrid-sortIcon': { - width: 'auto', - visibility: 'visible', - }, + ...{ headerStyleFix }, }); const premiumColor = function (baseColor: string, accentColor: string, point: number): string { diff --git a/frontend/src/components/DataGrid/HeaderFix.ts b/frontend/src/components/DataGrid/HeaderFix.ts new file mode 100644 index 00000000..a8f0d167 --- /dev/null +++ b/frontend/src/components/DataGrid/HeaderFix.ts @@ -0,0 +1,24 @@ +// Temporary fix for regression for hidden column labels on Mobile: +// https://github.com/mui/mui-x/issues/9776#issuecomment-1648306844 +const headerStyleFix = { + '@media (hover: none)': { + '&& .MuiDataGrid-menuIcon': { + width: 0, + visibility: 'hidden', + }, + '&& .MuiDataGrid-sortIcon': { + width: 0, + visibility: 'hidden', + }, + }, + '&& .MuiDataGrid-columnHeader--sorted .MuiDataGrid-menuIcon': { + width: 'auto', + visibility: 'visible', + }, + '&& .MuiDataGrid-columnHeader--sorted .MuiDataGrid-sortIcon': { + width: 'auto', + visibility: 'visible', + }, +}; + +export default headerStyleFix; diff --git a/frontend/src/components/FederationTable/index.tsx b/frontend/src/components/FederationTable/index.tsx index f28e63f0..34b15228 100644 --- a/frontend/src/components/FederationTable/index.tsx +++ b/frontend/src/components/FederationTable/index.tsx @@ -7,6 +7,7 @@ import RobotAvatar from '../RobotAvatar'; import { Link, LinkOff } from '@mui/icons-material'; import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; import { type UseFederationStoreType, FederationContext } from '../../contexts/FederationContext'; +import headerStyleFix from '../DataGrid/HeaderFix'; interface FederationTableProps { maxWidth?: number; @@ -225,6 +226,7 @@ const FederationTable = ({ } > Date: Sun, 21 Apr 2024 22:24:05 +0100 Subject: [PATCH 25/42] chore(api): update api schema --- docs/assets/schemas/api-latest.yaml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/assets/schemas/api-latest.yaml b/docs/assets/schemas/api-latest.yaml index 1ed83986..b6a64a29 100644 --- a/docs/assets/schemas/api-latest.yaml +++ b/docs/assets/schemas/api-latest.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: RoboSats REST API - version: 0.5.4 + version: 0.6.0 x-logo: url: https://raw.githubusercontent.com/Reckless-Satoshi/robosats/main/frontend/static/assets/images/robosats-0.1.1-banner.png backgroundColor: '#FFFFFF' @@ -1077,6 +1077,7 @@ components: status: allOf: - $ref: '#/components/schemas/StatusEnum' + default: 0 minimum: 0 maximum: 32767 created_at: @@ -1100,6 +1101,7 @@ components: nullable: true has_range: type: boolean + default: false min_amount: type: string format: decimal @@ -1112,14 +1114,17 @@ components: nullable: true payment_method: type: string + default: not specified maxLength: 70 is_explicit: type: boolean + default: false premium: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ nullable: true + default: '0.00' satoshis: type: integer maximum: 5000000 @@ -1135,10 +1140,12 @@ components: type: integer maximum: 28800 minimum: 1800 + default: 10799 bond_size: type: string format: decimal pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ + default: '3.00' latitude: type: string format: decimal @@ -1205,6 +1212,7 @@ components: format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ nullable: true + default: '0.00' satoshis: type: integer maximum: 5000000 @@ -1214,14 +1222,17 @@ components: type: integer maximum: 86400 minimum: 597.6 + default: 86399 escrow_duration: type: integer maximum: 28800 minimum: 1800 + default: 10799 bond_size: type: string format: decimal pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ + default: '3.00' latitude: type: string format: decimal @@ -1261,6 +1272,7 @@ components: status: allOf: - $ref: '#/components/schemas/StatusEnum' + default: 0 minimum: 0 maximum: 32767 created_at: @@ -1284,6 +1296,7 @@ components: nullable: true has_range: type: boolean + default: false min_amount: type: string format: decimal @@ -1296,9 +1309,11 @@ components: nullable: true payment_method: type: string + default: not specified maxLength: 70 is_explicit: type: boolean + default: false premium: type: string description: Premium over the CEX price set by the maker @@ -1324,6 +1339,7 @@ components: type: integer maximum: 28800 minimum: 1800 + default: 10799 total_secs_exp: type: integer description: Duration of time (in seconds) to expire, according to the current @@ -1495,10 +1511,12 @@ components: type: integer maximum: 86400 minimum: 597.6 + default: 86399 bond_size: type: string format: decimal pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ + default: '3.00' trade_fee_percent: type: integer description: The fee for the trade (fees differ for maker and taker) @@ -1580,6 +1598,7 @@ components: nullable: true has_range: type: boolean + default: false min_amount: type: string format: decimal @@ -1592,14 +1611,17 @@ components: nullable: true payment_method: type: string + default: not specified maxLength: 70 is_explicit: type: boolean + default: false premium: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ nullable: true + default: '0.00' satoshis: type: integer maximum: 5000000 @@ -1623,6 +1645,7 @@ components: type: integer maximum: 28800 minimum: 1800 + default: 10799 satoshis_now: type: integer description: The amount of sats to be traded at the present moment (not @@ -1631,6 +1654,7 @@ components: type: string format: decimal pattern: ^-?\d{0,2}(?:\.\d{0,2})?$ + default: '3.00' latitude: type: string format: decimal @@ -1867,6 +1891,7 @@ components: fee: type: string format: decimal + default: '0.0000' TypeEnum: enum: - 0 From a253ff93f7634c84e8d50e32b32c84302dc7649a Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 26 Apr 2024 21:23:41 +0100 Subject: [PATCH 26/42] docs: improve SEPA guidelines --- .../docs/01-best-practices/02-payment-methods.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/_pages/docs/01-best-practices/02-payment-methods.md b/docs/_pages/docs/01-best-practices/02-payment-methods.md index 174a77f5..ac91f471 100644 --- a/docs/_pages/docs/01-best-practices/02-payment-methods.md +++ b/docs/_pages/docs/01-best-practices/02-payment-methods.md @@ -62,6 +62,14 @@ In Canada, [Interac e-Transfer](https://www.interac.ca/en/consumers/support/faq- The best practice for users trying to transact with a payment method with a high risk of losing funds is discussed in this section. +### Instant SEPA Payment Guidelines + +Instant SEPA is a widely adopted payment method across Europe, offering fast and efficient cashless transactions. However, it comes with a significant risk for sellers, including the potential for chargebacks. To mitigate these risks, it is advisable for sellers to request the buyer's information before sharing their SEPA details. This information could include the buyer's country, full name, and bank account number. By obtaining this information, sellers can reduce the risk of fraudulent transactions, such as triangle attacks, while buyers, sharing this information does not decrease their privacy, as they are not exposing any additional information that the seller would not have access to anyway after the SEPA transfer. + +For buyers, it is crucial to comply with sellers' if they request personal information when they are initiating SEPA transactions. Failure to provide this information can lead to the seller raising an immediate dispute, which sellers are likely to win (the seller will also earn the buyer's bond in this specific case). Therefore, it is in the best interest of buyers to cooperate with sellers' requests for information. + +Sellers are encouraged to share a link to this guide with their buyers when requesting information. This ensures that both parties are informed and understand the importance of this step when using Instant SEPA. + ### Revolut via payment links In a Revolut payment, a `@revtag` is usually exchanged in the chat and can be verified in the payment history of the app making proof of payments easy. @@ -70,7 +78,7 @@ However, payment links, which have the format https://revolut.me/p/XXXXX, don't In a dispute, there's no recipient address reference and both buyer and seller could cheat. The payment link could be redeemed by an unknown third party complicit with either buyer or seller. -Therefore, insist on receiving the `@revtag` when making a payment with Revolut to avoid these risks. The `@revtag` can also be received as a link. This link would look like this: https://revolut.me/@revtag. +Therefore, insist on receiving the `@revtag` when making a payment with Revolut to avoid these risks. The `@revtag` can also be received as a link. This link would look like this: https://revolut.me/@revtag. ### Paypal Paypal is one of the widely used fiat payment methods. However, with PayPal buyer protection policy, buyer can do fraudulent action by creating a refund request in PayPal after the trading process in RoboSats is finished and therefore taking both fiat and bitcoin all by themselves. From a02b2b117b6f77cc03acbaa697386fad6635a99f Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 26 Apr 2024 21:47:01 +0100 Subject: [PATCH 27/42] docs: update payment methods paypal section --- .../01-best-practices/02-payment-methods.md | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/docs/_pages/docs/01-best-practices/02-payment-methods.md b/docs/_pages/docs/01-best-practices/02-payment-methods.md index ac91f471..31b2cefa 100644 --- a/docs/_pages/docs/01-best-practices/02-payment-methods.md +++ b/docs/_pages/docs/01-best-practices/02-payment-methods.md @@ -81,9 +81,11 @@ In a dispute, there's no recipient address reference and both buyer and seller c Therefore, insist on receiving the `@revtag` when making a payment with Revolut to avoid these risks. The `@revtag` can also be received as a link. This link would look like this: https://revolut.me/@revtag. ### Paypal -Paypal is one of the widely used fiat payment methods. However, with PayPal buyer protection policy, buyer can do fraudulent action by creating a refund request in PayPal after the trading process in RoboSats is finished and therefore taking both fiat and bitcoin all by themselves. +Paypal is one of the widely used fiat payment methods. However, as a seller Paypal is the highest risk you can take. Using Paypal as payment method is not advised. -This fraud can be prevented by agreeing with the buyer to have them send money using the “send money to a friend or family member” option. This will make the buyer become the one liable for the transaction fee and make it less likely for them to request a refund. +If you still wish to use Paypal there is a few things to take into account. With PayPal buyer protection policy, buyers can do fraudulent action by creating a refund request in PayPal after the trading process in RoboSats is finished and therefore taking both fiat and bitcoin all by themselves. + +This fraud could be prevented by agreeing with the buyer to have them send money using the “send money to a friend or family member” option. This will make the buyer become the one liable for the transaction fee and make it less likely for them to request a refund. ### For seller If you are a seller and your peer both agreed to use “send money to a friend or family member” but your peer used the "send money for Goods or Services" option, you should return the fiat payment and ask your peer to send with an agreed method. If they insist to break the agreement, you may ask them to voluntarily end the trade or end the trade by calling a dispute. @@ -91,26 +93,4 @@ If you are a seller and your peer both agreed to use “send money to a friend o ### For buyer If you are a buyer and you need to use “send money to a friend or family member” to pay fiat to your peer, you can choose the specified payment type by following these steps. -#### PayPal Desktop -In PayPal desktop, it is located below the drop-down currency list, it should be labeled as "Sending to a friend". -If it is labeled otherwise, you'll need to click "Change" on the right to change the payment type. -
- -
-Then select "Sending to a friend" in the payment type choosing page. -
- -
- -#### PayPal Mobile -In PayPal mobile, it is located below the payment method (In this case is VISA), it should be labeled as "Friends or Family". -If it is labeled otherwise, you'll need to tab ">" on the right to change the payment type. -
- -
-Then select "Friends or Family" in the payment type choosing page. -
- -
- {% include improve %} From 12669a387dc8fe97ed66fac73cfe81d6c88624e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:45:38 +0000 Subject: [PATCH 28/42] Bump ruff from 0.3.4 to 0.4.2 (#1256) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.4 to 0.4.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.4...v0.4.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 1783a603..fdd08767 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,4 +1,4 @@ coverage==7.4.4 -ruff==0.3.4 +ruff==0.4.2 drf-openapi-tester==2.3.3 pre-commit==3.7.0 \ No newline at end of file From ebc1bb70fa8bccd3e7ef1870f69bc1676710648f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:46:33 +0000 Subject: [PATCH 29/42] Bump coverage from 7.4.4 to 7.5.0 (#1255) Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.4.4 to 7.5.0. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.4.4...7.5.0) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index fdd08767..3b52d48c 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,4 +1,4 @@ -coverage==7.4.4 +coverage==7.5.0 ruff==0.4.2 drf-openapi-tester==2.3.3 pre-commit==3.7.0 \ No newline at end of file From 34ef099573e81fdaffe7fc194a17bd37e105405d Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:58:03 +0000 Subject: [PATCH 30/42] Feat: add coordinator opt for geoblocked countries (#1258) * Add location validator * Add bad location tests --- .env-sample | 6 ++++++ api/logics.py | 19 +++++++++++++++++-- api/utils.py | 27 +++++++++++++++++++++++++++ api/views.py | 4 ++++ requirements.txt | 1 + tests/test_trade_pipeline.py | 32 ++++++++++++++++++++++++++++++++ tests/utils/trade.py | 2 +- 7 files changed, 88 insertions(+), 3 deletions(-) diff --git a/.env-sample b/.env-sample index cfb09671..66841738 100644 --- a/.env-sample +++ b/.env-sample @@ -58,6 +58,12 @@ SECRET_KEY = 'django-insecure-6^&6uw$b5^en%(cu2kc7_o)(mgpazx#j_znwlym0vxfamn2uo- # e.g. robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion ONION_LOCATION = '' +# Geoblocked countries (will reject F2F trades). +# List of A3 country codes (see fhttps://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) +# Leave empty '' to allow all countries. +# Example 'NOR,USA,CZE'. +GEOBLOCKED_COUNTRIES = 'ABW,AFG,AGO' + # Link to robosats alternative site (shown in frontend in statsfornerds so users can switch mainnet/testnet) ALTERNATIVE_SITE = 'RoboSats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion' ALTERNATIVE_NAME = 'RoboSats Mainnet' diff --git a/api/logics.py b/api/logics.py index 54918014..06d402ba 100644 --- a/api/logics.py +++ b/api/logics.py @@ -1,7 +1,7 @@ import math from datetime import timedelta -from decouple import config +from decouple import config, Csv from django.contrib.auth.models import User from django.db.models import Q, Sum from django.utils import timezone @@ -9,7 +9,7 @@ from django.utils import timezone from api.lightning.node import LNNode from api.models import Currency, LNPayment, MarketTick, OnchainPayment, Order from api.tasks import send_devfund_donation, send_notification -from api.utils import get_minning_fee, validate_onchain_address +from api.utils import get_minning_fee, validate_onchain_address, location_country from chat.models import Message FEE = float(config("FEE")) @@ -29,6 +29,8 @@ MAX_MINING_NETWORK_SPEEDUP_EXPECTED = float( config("MAX_MINING_NETWORK_SPEEDUP_EXPECTED") ) +GEOBLOCKED_COUNTRIES = config("GEOBLOCKED_COUNTRIES", cast=Csv(), default=[]) + class Logics: @classmethod @@ -137,6 +139,19 @@ class Logics: return True, None + @classmethod + def validate_location(cls, order) -> bool: + if not (order.latitude or order.longitude): + return True, None + + country = location_country(order.longitude, order.latitude) + if country in GEOBLOCKED_COUNTRIES: + return False, { + "bad_request": f"The coordinator does not support orders in {country}" + } + else: + return True, None + def validate_amount_within_range(order, amount): if amount > float(order.max_amount) or amount < float(order.min_amount): return False, { diff --git a/api/utils.py b/api/utils.py index 85b5dbcf..13fad5b0 100644 --- a/api/utils.py +++ b/api/utils.py @@ -479,6 +479,33 @@ def is_valid_token(token: str) -> bool: return all(c in charset for c in token) +def location_country(lon: float, lat: float) -> str: + """ + Returns the country code of a lon/lat location + """ + + from shapely.geometry import shape, Point + from shapely.prepared import prep + + # Load the GeoJSON data from a local file + with open("frontend/static/assets/geo/countries-coastline-10km.geo.json") as f: + countries_geojeson = json.load(f) + + # Prepare the countries for reverse geocoding + countries = {} + for feature in countries_geojeson["features"]: + geom = feature["geometry"] + country_code = feature["properties"]["A3"] + countries[country_code] = prep(shape(geom)) + + point = Point(lon, lat) + for country_code, geom in countries.items(): + if geom.contains(point): + return country_code + + return "unknown" + + def objects_to_hyperlinks(logs: str) -> str: """ Parses strings that have Object(ID,NAME) that match API models. diff --git a/api/views.py b/api/views.py index 53e15292..78bd275c 100644 --- a/api/views.py +++ b/api/views.py @@ -166,6 +166,10 @@ class MakerView(CreateAPIView): if not valid: return Response(context, status.HTTP_400_BAD_REQUEST) + valid, context = Logics.validate_location(order) + if not valid: + return Response(context, status.HTTP_400_BAD_REQUEST) + order.save() order.log( f"Order({order.id},{order}) created by Robot({request.user.robot.id},{request.user})" diff --git a/requirements.txt b/requirements.txt index 3fdd9276..b6b89c85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,6 +22,7 @@ psycopg2==2.9.9 SQLAlchemy==2.0.16 django-import-export==3.3.8 requests[socks] +shapely==2.0.4 python-gnupg==0.5.2 daphne==4.1.0 drf-spectacular==0.27.2 diff --git a/tests/test_trade_pipeline.py b/tests/test_trade_pipeline.py index 4205b98c..32a39c9e 100644 --- a/tests/test_trade_pipeline.py +++ b/tests/test_trade_pipeline.py @@ -239,6 +239,38 @@ class TradeTest(BaseAPITestCase): self.assertIsNone(data["taker"], "New order's taker is not null") self.assert_order_logs(data["id"]) + def test_make_order_on_blocked_country(self): + """ + Test the creation of an F2F order on a geoblocked location + """ + trade = Trade( + self.client, + # latitude and longitud in Aruba. One of the countries blocked in the example conf. + maker_form={ + "type": 0, + "currency": 1, + "has_range": True, + "min_amount": 21, + "max_amount": 101.7, + "payment_method": "Advcash Cash F2F", + "is_explicit": False, + "premium": 3.34, + "public_duration": 69360, + "escrow_duration": 8700, + "bond_size": 3.5, + "latitude": -11.8014, # Angola AGO + "longitude": 17.3575, + }, + ) # init of Trade calls make_order() with the default maker form. + data = trade.response.json() + + self.assertEqual(trade.response.status_code, 400) + self.assertResponse(trade.response) + + self.assertEqual( + data["bad_request"], "The coordinator does not support orders in AGO" + ) + def test_get_order_created(self): """ Tests the creation of an order and the first request to see details, diff --git a/tests/utils/trade.py b/tests/utils/trade.py index b00d0ae7..16b9b89d 100644 --- a/tests/utils/trade.py +++ b/tests/utils/trade.py @@ -98,8 +98,8 @@ class Trade: response = self.client.post(path, maker_form, **headers) + self.response = response if response.status_code == 201: - self.response = response self.order_id = response.json()["id"] def get_order(self, robot_index=1, first_encounter=False): From f60267262fa647b426773b0dd871de52ae5efd1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:58:33 +0000 Subject: [PATCH 31/42] Bump eslint-plugin-react-hooks from 4.6.0 to 4.6.2 in /mobile (#1252) Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 4.6.0 to 4.6.2. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks) --- updated-dependencies: - dependency-name: eslint-plugin-react-hooks dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- mobile/package-lock.json | 7 ++++--- mobile/package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mobile/package-lock.json b/mobile/package-lock.json index a98f3056..4253c61c 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -35,7 +35,7 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-hooks": "^4.6.2", "jest": "^29.7.0", "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", @@ -7056,9 +7056,10 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, diff --git a/mobile/package.json b/mobile/package.json index c213d06d..d494ad28 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -39,7 +39,7 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-hooks": "^4.6.2", "jest": "^29.7.0", "metro-react-native-babel-preset": "^0.75.1", "prettier": "^3.2.5", From c623a38574b33eec485f4a3b1dfef7018cc6a9f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:59:31 +0000 Subject: [PATCH 32/42] Bump daphne from 4.1.0 to 4.1.2 (#1254) Bumps [daphne](https://github.com/django/daphne) from 4.1.0 to 4.1.2. - [Changelog](https://github.com/django/daphne/blob/main/CHANGELOG.txt) - [Commits](https://github.com/django/daphne/compare/4.1.0...4.1.2) --- updated-dependencies: - dependency-name: daphne dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b6b89c85..42c74fa7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ django-import-export==3.3.8 requests[socks] shapely==2.0.4 python-gnupg==0.5.2 -daphne==4.1.0 +daphne==4.1.2 drf-spectacular==0.27.2 drf-spectacular-sidecar==2024.4.1 django-cors-headers==4.3.1 From c3d1cd247293966965af6ac8dbb23d35315b8eaa Mon Sep 17 00:00:00 2001 From: jerry Date: Mon, 29 Apr 2024 23:08:46 +0000 Subject: [PATCH 33/42] Return json output instead of html when wrong token in Header Authorization (#1247) fix #1246 Return a JsonResponse instead of raising AuthenticationFailed Exception that is turned into the general html error by django. rest_framework.response.Response should not be used in middleware, will return django.template.response.ContentNotRenderedError. --- robosats/middleware.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/robosats/middleware.py b/robosats/middleware.py index f75a82aa..5bb7bad8 100644 --- a/robosats/middleware.py +++ b/robosats/middleware.py @@ -8,8 +8,8 @@ from django.conf import settings from django.contrib.auth.models import AnonymousUser, User, update_last_login from django.utils import timezone from django.utils.deprecation import MiddlewareMixin +from django.http import JsonResponse from rest_framework.authtoken.models import Token -from rest_framework.exceptions import AuthenticationFailed from robohash import Robohash from api.nick_generator.nick_generator import NickGenerator @@ -79,8 +79,11 @@ class RobotTokenSHA256AuthenticationMiddleWare: return response if not is_valid_token(token_sha256_b91): - raise AuthenticationFailed( - "Robot token SHA256 was provided in the header. However it is not a valid 39 or 40 characters Base91 string." + return JsonResponse( + { + "bad_request": "Robot token SHA256 was provided in the header. However it is not a valid 39 or 40 characters Base91 string." + }, + status=400, ) # Check if it is an existing robot. @@ -123,8 +126,11 @@ class RobotTokenSHA256AuthenticationMiddleWare: encrypted_private_key = request.COOKIES.get("encrypted_private_key", "") if not public_key or not encrypted_private_key: - raise AuthenticationFailed( - "On the first request to a RoboSats coordinator, you must provide as well a valid public and encrypted private PGP keys" + return JsonResponse( + { + "bad_request": "On the first request to a RoboSats coordinator, you must provide as well a valid public and encrypted private PGP keys" + }, + status=400, ) ( valid, @@ -133,7 +139,7 @@ class RobotTokenSHA256AuthenticationMiddleWare: encrypted_private_key, ) = validate_pgp_keys(public_key, encrypted_private_key) if not valid: - raise AuthenticationFailed(bad_keys_context) + return JsonResponse({"bad_request": bad_keys_context}, status=400) # Hash the token_sha256, only 1 iteration. # This is the second SHA256 of the user token, aka RoboSats ID From 9071597b8c767f488a0d95ce2a5e142dd66d4c9e Mon Sep 17 00:00:00 2001 From: jerry Date: Mon, 29 Apr 2024 23:12:40 +0000 Subject: [PATCH 34/42] improve/update documentation in api/oas_schemas.py (#1244) Specify that the amount of the invoice sent in `update_invoice` should take into consideration `routing_budget_ppm`. Specify that the signed messages should be signed with SHA512. Remove the warning that in the future canceling not taken orders might result in losing the bond. Fix a broken link. Specify that the PGP key should be ed25519/cert,sign+cv25519/encr. --- api/oas_schemas.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/api/oas_schemas.py b/api/oas_schemas.py index 2c611f84..8b6412e6 100644 --- a/api/oas_schemas.py +++ b/api/oas_schemas.py @@ -219,14 +219,17 @@ class OrderViewSchema: - `update_invoice` - This action only is valid if you are the buyer. The `invoice` field needs to be present in the body and the value must be a - valid LN invoice as cleartext PGP message signed with the robot key. Make sure to perform this action only when + valid LN invoice as cleartext PGP message signed (SHA512) with the robot key. + The amount of the invoice should be `invoice_amount` minus the routing + budget whose parts per million should be specified by `routing_budget_ppm`. + Make sure to perform this action only when both the bonds are locked. i.e The status of your order is at least `6` (Waiting for trade collateral and buyer invoice) - `update_address` - This action is only valid if you are the buyer. This action is used to set an on-chain payout address if you wish to have your payout be received on-chain. Only valid if there is an address in the body as - cleartext PGP message signed with the robot key. This enables on-chain swap for the + cleartext PGP message signed (SHA512) with the robot key. This enables on-chain swap for the order, so even if you earlier had submitted a LN invoice, it will be ignored. You get to choose the `mining_fee_rate` as well. Mining fee rate is specified in sats/vbyte. @@ -246,9 +249,7 @@ class OrderViewSchema: mid-trade so use this action carefully: - As a maker if you cancel an order after you have locked your - maker bond, you are returned your bond. This may change in - the future to prevent DDoSing the LN node and you won't be - returned the maker bond. + maker bond, you are returned your bond. - As a taker there is a time penalty involved if you `take` an order and cancel it without locking the taker bond. - For both taker or maker, if you cancel the order when both @@ -387,12 +388,13 @@ class RobotViewSchema: An authenticated request (has the token's sha256 hash encoded as base 91 in the Authorization header) will be returned the information about the state of a robot. - Make sure you generate your token using cryptographically secure methods. [Here's]() the function the Javascript - client uses to generate the tokens. Since the server only receives the hash of the + Make sure you generate your token using cryptographically secure methods. + Since the server only receives the hash of the token, it is responsibility of the client to create a strong token. Check - [here](https://github.com/RoboSats/robosats/blob/main/frontend/src/utils/token.js) + [here](https://github.com/RoboSats/robosats/blob/main/frontend/src/utils/token.ts) to see how the Javascript client creates a random strong token and how it validates entropy is optimal for tokens created by the user at will. + The PGP key should be an EdDSA ed25519/cert,sign+cv25519/encr key. `public_key` - PGP key associated with the user (Armored ASCII format) `encrypted_private_key` - Private PGP key. This is only stored on the backend for later fetching by @@ -403,7 +405,7 @@ class RobotViewSchema: A gpg key can be created by: ```shell - gpg --full-gen-key + gpg --default-new-key-algo "ed25519/cert,sign+cv25519/encr" --full-gen-key ``` it's public key can be exported in ascii armored format with: @@ -531,7 +533,7 @@ class InfoViewSchema: class RewardViewSchema: post = { "summary": "Withdraw reward", - "description": "Withdraw user reward by submitting an invoice. The invoice must be send as cleartext PGP message signed with the robot key", + "description": "Withdraw user reward by submitting an invoice. The invoice must be send as cleartext PGP message signed (SHA512) with the robot key", "responses": { 200: { "type": "object", From a1c63ca622f6eebc0a83820a14ed1cf214c87425 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Thu, 28 Mar 2024 22:42:32 +0100 Subject: [PATCH 35/42] Federation Android App and new Tor engine --- frontend/src/basic/RobotPage/index.tsx | 4 +- .../RobotAvatar/RobohashGenerator.ts | 9 +- .../components/RobotAvatar/robohash.worker.ts | 31 +- frontend/src/components/RobotInfo/index.tsx | 1 - frontend/src/components/TorConnection.tsx | 4 +- .../src/components/TorConnection/index.tsx | 4 +- frontend/src/contexts/AppContext.tsx | 8 +- frontend/src/contexts/FederationContext.tsx | 21 +- frontend/src/models/Coordinator.model.ts | 2 +- frontend/src/models/Slot.model.ts | 6 +- .../src/services/api/ApiNativeClient/index.ts | 1 + mobile/App.tsx | 55 +-- mobile/android/app/build.gradle | 7 +- .../android/app/src/main/AndroidManifest.xml | 1 + .../java/com/robosats/MainApplication.java | 5 +- .../java/com/robosats/RobosatsPackage.java | 28 ++ .../java/com/robosats/modules/TorModule.java | 164 ++++++++ .../java/com/robosats/tor/EnumTorState.kt | 8 + .../java/com/robosats/tor/TorKmpManager.kt | 389 ++++++++++++++++++ .../main/java/com/robosats/tor/TorState.kt | 14 + mobile/android/build.gradle | 1 - mobile/package-lock.json | 1 - mobile/package.json | 1 - mobile/services/Tor/index.ts | 68 ++- 24 files changed, 724 insertions(+), 109 deletions(-) create mode 100644 mobile/android/app/src/main/java/com/robosats/RobosatsPackage.java create mode 100644 mobile/android/app/src/main/java/com/robosats/modules/TorModule.java create mode 100644 mobile/android/app/src/main/java/com/robosats/tor/EnumTorState.kt create mode 100644 mobile/android/app/src/main/java/com/robosats/tor/TorKmpManager.kt create mode 100644 mobile/android/app/src/main/java/com/robosats/tor/TorState.kt diff --git a/frontend/src/basic/RobotPage/index.tsx b/frontend/src/basic/RobotPage/index.tsx index ed4ec6eb..6e648929 100644 --- a/frontend/src/basic/RobotPage/index.tsx +++ b/frontend/src/basic/RobotPage/index.tsx @@ -44,7 +44,7 @@ const RobotPage = (): JSX.Element => { const token = urlToken ?? garage.currentSlot; if (token !== undefined && token !== null && page === 'robot') { setInputToken(token); - if (window.NativeRobosats === undefined || torStatus === '"Done"') { + if (window.NativeRobosats === undefined || torStatus === 'ON') { getGenerateRobot(token); setView('profile'); } @@ -83,7 +83,7 @@ const RobotPage = (): JSX.Element => { garage.deleteSlot(); }; - if (!(window.NativeRobosats === undefined) && !(torStatus === 'DONE' || torStatus === '"Done"')) { + if (!(window.NativeRobosats === undefined) && !(torStatus === 'ON')) { return ( { + // FIXME + return ''; const cacheKey = `${size}px;${hash}`; if (this.assetsCache[cacheKey]) { return this.assetsCache[cacheKey]; diff --git a/frontend/src/components/RobotAvatar/robohash.worker.ts b/frontend/src/components/RobotAvatar/robohash.worker.ts index f0c7da33..b8a513ad 100644 --- a/frontend/src/components/RobotAvatar/robohash.worker.ts +++ b/frontend/src/components/RobotAvatar/robohash.worker.ts @@ -1,17 +1,18 @@ -import { async_generate_robohash } from 'robo-identities-wasm'; +// FIXME +// import { async_generate_robohash } from 'robo-identities-wasm'; -// Listen for messages from the main thread -self.addEventListener('message', (event) => { - void (async () => { - const { hash, size, cacheKey } = event.data; +// // Listen for messages from the main thread +// self.addEventListener('message', (event) => { +// void (async () => { +// const { hash, size, cacheKey } = event.data; - // Generate the image using async_image_base - const t0 = performance.now(); - const avatarB64: string = await async_generate_robohash(hash, size === 'small' ? 80 : 256); - const imageUrl = `data:image/png;base64,${avatarB64}`; - const t1 = performance.now(); - console.log(`Avatar generated in: ${t1 - t0} ms`); - // Send the result back to the main thread - self.postMessage({ cacheKey, imageUrl }); - })(); -}); +// // Generate the image using async_image_base +// const t0 = performance.now(); +// const avatarB64: string = await async_generate_robohash(hash, size === 'small' ? 80 : 256); +// const imageUrl = `data:image/png;base64,${avatarB64}`; +// const t1 = performance.now(); +// console.log(`Avatar generated in: ${t1 - t0} ms`); +// // Send the result back to the main thread +// self.postMessage({ cacheKey, imageUrl }); +// })(); +// }); diff --git a/frontend/src/components/RobotInfo/index.tsx b/frontend/src/components/RobotInfo/index.tsx index b5ce895f..382a222b 100644 --- a/frontend/src/components/RobotInfo/index.tsx +++ b/frontend/src/components/RobotInfo/index.tsx @@ -95,7 +95,6 @@ const RobotInfo: React.FC = ({ coordinator, onClose, disabled }: Props) = (signedInvoice) => { console.log('Signed message:', signedInvoice); void coordinator.fetchReward(signedInvoice, garage, slot?.token).then((data) => { - console.log(data); setBadInvoice(data.bad_invoice ?? ''); setShowRewardsSpinner(false); setWithdrawn(data.successful_withdrawal); diff --git a/frontend/src/components/TorConnection.tsx b/frontend/src/components/TorConnection.tsx index 77e33b88..006dd1b0 100644 --- a/frontend/src/components/TorConnection.tsx +++ b/frontend/src/components/TorConnection.tsx @@ -62,7 +62,7 @@ const TorConnectionBadge = (): JSX.Element => { return <>; } - if (torStatus === 'NOTINIT') { + if (torStatus === 'OFF' || torStatus === 'STOPPING') { return ( { title={t('Connecting to TOR network')} /> ); - } else if (torStatus === '"Done"' || torStatus === 'DONE') { + } else if (torStatus === 'ON') { return ; } else { return ( diff --git a/frontend/src/components/TorConnection/index.tsx b/frontend/src/components/TorConnection/index.tsx index deffc0da..4484c213 100644 --- a/frontend/src/components/TorConnection/index.tsx +++ b/frontend/src/components/TorConnection/index.tsx @@ -62,7 +62,7 @@ const TorConnectionBadge = (): JSX.Element => { return <>; } - if (torStatus === 'NOTINIT') { + if (torStatus === 'OFF' || torStatus === 'STOPING') { return ( { title={t('Connecting to TOR network')} /> ); - } else if (torStatus === '"Done"' || torStatus === 'DONE') { + } else if (torStatus === 'ON') { return ; } else { return ( diff --git a/frontend/src/contexts/AppContext.tsx b/frontend/src/contexts/AppContext.tsx index b2a79260..45b4a84c 100644 --- a/frontend/src/contexts/AppContext.tsx +++ b/frontend/src/contexts/AppContext.tsx @@ -37,7 +37,7 @@ export interface SlideDirection { out: 'left' | 'right' | undefined; } -export type TorStatus = 'NOTINIT' | 'STARTING' | '"Done"' | 'DONE'; +export type TorStatus = 'ON' | 'STARTING' | 'STOPPING' | 'OFF'; export const isNativeRoboSats = !(window.NativeRobosats === undefined); @@ -155,8 +155,8 @@ export interface UseAppStoreType { export const initialAppContext: UseAppStoreType = { theme: undefined, - torStatus: 'NOTINIT', - settings: getSettings(), + torStatus: 'STARTING', + settings: new Settings(), setSettings: () => {}, page: entryPage, setPage: () => {}, @@ -225,7 +225,7 @@ export const AppContextProvider = ({ children }: AppContextProviderProps): JSX.E () => { setTorStatus(event?.detail); }, - event?.detail === '"Done"' ? 5000 : 0, + event?.detail === 'ON' ? 5000 : 0, ); }); }, []); diff --git a/frontend/src/contexts/FederationContext.tsx b/frontend/src/contexts/FederationContext.tsx index a1f3ac8e..4ba69a1d 100644 --- a/frontend/src/contexts/FederationContext.tsx +++ b/frontend/src/contexts/FederationContext.tsx @@ -15,6 +15,7 @@ import { federationLottery } from '../utils'; import { AppContext, type UseAppStoreType } from './AppContext'; import { GarageContext, type UseGarageStoreType } from './GarageContext'; +import NativeRobosats from '../services/Native'; // Refresh delays (ms) according to Order status const defaultDelay = 5000; @@ -105,15 +106,17 @@ export const FederationContextProvider = ({ useEffect(() => { // On bitcoin network change we reset book, limits and federation info and fetch everything again - const newFed = initialFederationContext.federation; - newFed.registerHook('onFederationUpdate', () => { - setFederationUpdatedAt(new Date().toISOString()); - }); - newFed.registerHook('onCoordinatorUpdate', () => { - setCoordinatorUpdatedAt(new Date().toISOString()); - }); - void newFed.start(origin, settings, hostUrl); - setFederation(newFed); + if (window.NativeRobosats === undefined || torStatus === 'ON') { + const newFed = initialFederationContext.federation; + newFed.registerHook('onFederationUpdate', () => { + setFederationUpdatedAt(new Date().toISOString()); + }); + newFed.registerHook('onCoordinatorUpdate', () => { + setCoordinatorUpdatedAt(new Date().toISOString()); + }); + void newFed.start(origin, settings, hostUrl); + setFederation(newFed); + } }, [settings.network, torStatus]); const onOrderReceived = (order: Order): void => { diff --git a/frontend/src/models/Coordinator.model.ts b/frontend/src/models/Coordinator.model.ts index cd902e16..7ba2be53 100644 --- a/frontend/src/models/Coordinator.model.ts +++ b/frontend/src/models/Coordinator.model.ts @@ -205,6 +205,7 @@ export class Coordinator { apiClient .get(this.url, `${this.basePath}/api/book/`) .then((data) => { + console.log('BOOK', data); if (!data?.not_found) { this.book = (data as PublicOrder[]).map((order) => { order.coordinatorShortAlias = this.shortAlias; @@ -370,7 +371,6 @@ export class Coordinator { return await apiClient .get(this.url, `${this.basePath}/api/order/?order_id=${orderId}`, authHeaders) .then((data) => { - console.log('data', data); const order: Order = { ...defaultOrder, ...data, diff --git a/frontend/src/models/Slot.model.ts b/frontend/src/models/Slot.model.ts index 864820ed..9936e7eb 100644 --- a/frontend/src/models/Slot.model.ts +++ b/frontend/src/models/Slot.model.ts @@ -1,14 +1,16 @@ import { sha256 } from 'js-sha256'; import { Robot, type Order } from '.'; import { robohash } from '../components/RobotAvatar/RobohashGenerator'; -import { generate_roboname } from 'robo-identities-wasm'; +// import { generate_roboname } from 'robo-identities-wasm'; class Slot { constructor(token: string, shortAliases: string[], robotAttributes: Record) { this.token = token; this.hashId = sha256(sha256(this.token)); - this.nickname = generate_roboname(this.hashId); + // FIXME + // this.nickname = generate_roboname(this.hashId); + this.nickname = 'Robot'; // trigger RoboHash avatar generation in webworker and store in RoboHash class cache. void robohash.generate(this.hashId, 'small'); void robohash.generate(this.hashId, 'large'); diff --git a/frontend/src/services/api/ApiNativeClient/index.ts b/frontend/src/services/api/ApiNativeClient/index.ts index 21620f42..bea3a46f 100644 --- a/frontend/src/services/api/ApiNativeClient/index.ts +++ b/frontend/src/services/api/ApiNativeClient/index.ts @@ -30,6 +30,7 @@ class ApiNativeClient implements ApiClient { }; private readonly parseResponse = (response: Record): object => { + console.log('response', response); if (response.headers['set-cookie'] != null) { response.headers['set-cookie'].forEach((cookie: string) => { const keySplit: string[] = cookie.split('='); diff --git a/mobile/App.tsx b/mobile/App.tsx index 66a2babe..5d6b5769 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -1,23 +1,45 @@ -import React, { useRef } from 'react'; +import React, { useEffect, useRef } from 'react'; import { WebView, WebViewMessageEvent } from 'react-native-webview'; -import { SafeAreaView, Text, Platform, Appearance } from 'react-native'; +import { SafeAreaView, Text, Platform, Appearance, DeviceEventEmitter } from 'react-native'; import TorClient from './services/Tor'; import Clipboard from '@react-native-clipboard/clipboard'; -import NetInfo from '@react-native-community/netinfo'; import EncryptedStorage from 'react-native-encrypted-storage'; import { name as app_name, version as app_version } from './package.json'; +import TorModule from './lib/native/TorModule'; const backgroundColors = { light: 'white', dark: 'black', }; +export type TorStatus = 'ON' | 'STARTING' | 'STOPPING' | 'OFF'; + const App = () => { const colorScheme = Appearance.getColorScheme() ?? 'light'; const torClient = new TorClient(); const webViewRef = useRef(); const uri = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/index.html'; + useEffect(() => { + TorModule.start(); + DeviceEventEmitter.addListener('TorStatus', (payload) => { + console.log(payload.torStatus); + if (payload.torStatus === 'OFF') TorModule.restart(); + injectMessage({ + category: 'system', + type: 'torStatus', + detail: payload.torStatus, + }); + }); + }, []); + + useEffect(() => { + const interval = setInterval(() => { + TorModule.getTorStatus(); + }, 2000); + return () => clearInterval(interval); + }, []); + const injectMessageResolve = (id: string, data?: object) => { const json = JSON.stringify(data || {}); webViewRef.current?.injectJavaScript( @@ -72,7 +94,7 @@ const App = () => { const onMessage = async (event: WebViewMessageEvent) => { const data = JSON.parse(event.nativeEvent.data); if (data.category === 'http') { - sendTorStatus(); + TorModule.getTorStatus(); if (data.type === 'get') { torClient .get(data.baseUrl, data.path, data.headers) @@ -80,7 +102,7 @@ const App = () => { injectMessageResolve(data.id, response); }) .catch((e) => onCatch(data.id, e)) - .finally(sendTorStatus); + .finally(TorModule.getTorStatus); } else if (data.type === 'post') { torClient .post(data.baseUrl, data.path, data.body, data.headers) @@ -88,7 +110,7 @@ const App = () => { injectMessageResolve(data.id, response); }) .catch((e) => onCatch(data.id, e)) - .finally(sendTorStatus); + .finally(TorModule.getTorStatus); } else if (data.type === 'delete') { torClient .delete(data.baseUrl, data.path, data.headers) @@ -96,7 +118,7 @@ const App = () => { injectMessageResolve(data.id, response); }) .catch((e) => onCatch(data.id, e)) - .finally(sendTorStatus); + .finally(TorModule.getTorStatus); } else if (data.type === 'xhr') { torClient .request(data.baseUrl, data.path) @@ -104,7 +126,7 @@ const App = () => { injectMessageResolve(data.id, response); }) .catch((e) => onCatch(data.id, e)) - .finally(sendTorStatus); + .finally(TorModule.getTorStatus); } } else if (data.category === 'system') { if (data.type === 'init') { @@ -132,23 +154,6 @@ const App = () => { } catch (error) {} }; - const sendTorStatus = async (event?: any) => { - NetInfo.fetch().then(async (state) => { - let daemonStatus = 'ERROR'; - if (state.isInternetReachable) { - try { - daemonStatus = await torClient.daemon.getDaemonStatus(); - } catch {} - } - - injectMessage({ - category: 'system', - type: 'torStatus', - detail: daemonStatus, - }); - }); - }; - return ( + android:extractNativeLibs="true" packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); + packages.add(new RobosatsPackage()); + return packages; } diff --git a/mobile/android/app/src/main/java/com/robosats/RobosatsPackage.java b/mobile/android/app/src/main/java/com/robosats/RobosatsPackage.java new file mode 100644 index 00000000..a421fab8 --- /dev/null +++ b/mobile/android/app/src/main/java/com/robosats/RobosatsPackage.java @@ -0,0 +1,28 @@ +package com.robosats; + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; +import com.robosats.modules.TorModule; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class RobosatsPackage implements ReactPackage { + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } + + @Override + public List createNativeModules( + ReactApplicationContext reactContext) { + List modules = new ArrayList<>(); + + modules.add(new TorModule(reactContext)); + + return modules; + } +} diff --git a/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java b/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java new file mode 100644 index 00000000..ff60f9d0 --- /dev/null +++ b/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java @@ -0,0 +1,164 @@ +package com.robosats.modules; + +import android.util.Log; + +import androidx.annotation.NonNull; + +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.modules.core.DeviceEventManagerModule; +import com.robosats.tor.TorKmpManager; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + + +public class TorModule extends ReactContextBaseJavaModule { + private TorKmpManager torKmpManager; + private ReactApplicationContext context; + public TorModule(ReactApplicationContext reactContext) { + context = reactContext; + } + + @Override + public String getName() { + return "TorModule"; + } + + @ReactMethod + public void sendRequest(String action, String url, String headers, String body, final Promise promise) throws JSONException { + Log.d("RobosatsUrl", url); + OkHttpClient client = new OkHttpClient.Builder() + .connectTimeout(60, TimeUnit.SECONDS) // Set connection timeout + .readTimeout(30, TimeUnit.SECONDS) // Set read timeout + .proxy(torKmpManager.getProxy()).build(); + + Request.Builder requestBuilder = new Request.Builder().url(url); + + JSONObject headersObject = new JSONObject(headers); + headersObject.keys().forEachRemaining(key -> { + String value = headersObject.optString(key); + requestBuilder.addHeader(key, value); + }); + + if (Objects.equals(action, "DELETE")) { + requestBuilder.delete(); + } else if (Objects.equals(action, "POST")) { + RequestBody requestBody = RequestBody.create(body, MediaType.get("application/json; charset=utf-8")); + requestBuilder.post(requestBody); + } else { + requestBuilder.get(); + } + + Request request = requestBuilder.build(); + client.newCall(request).enqueue(new Callback() { + @Override + public void onFailure(@NonNull Call call, @NonNull IOException e) { + Log.d("RobosatsError", e.toString()); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + Log.d("RobosatsCode", String.valueOf(response.code())); + String body = response.body() != null ? response.body().string() : "{}"; + JSONObject headersJson = new JSONObject(); + response.headers().names().forEach(name -> { + try { + headersJson.put(name, response.header(name)); + } catch (JSONException e) { + throw new RuntimeException(e); + } + }); + if (response.code() != 200) { + Log.d("RobosatsError", "Request error code: " + response.code()); + } else if (response.isSuccessful()) { + promise.resolve("{\"json\":" + body + ", \"headers\": " + headersJson +"}"); + } + } + }); + } + + @ReactMethod + public void getTorStatus() { + String torState = torKmpManager.getTorState().getState().name(); + WritableMap payload = Arguments.createMap(); + payload.putString("torStatus", torState); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorStatus", payload); + } + + @ReactMethod + public void isConnected() { + String isConnected = String.valueOf(torKmpManager.isConnected()); + WritableMap payload = Arguments.createMap(); + payload.putString("isConnected", isConnected); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorIsConnected", payload); + } + + @ReactMethod + public void isStarting() { + String isStarting = String.valueOf(torKmpManager.isStarting()); + WritableMap payload = Arguments.createMap(); + payload.putString("isStarting", isStarting); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorIsStarting", payload); + } + + @ReactMethod + public void stop() { + torKmpManager.getTorOperationManager().stopQuietly(); + WritableMap payload = Arguments.createMap(); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorStop", payload); + } + + @ReactMethod + public void start() { + torKmpManager = new TorKmpManager(context.getCurrentActivity().getApplication()); + torKmpManager.getTorOperationManager().startQuietly(); + WritableMap payload = Arguments.createMap(); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorStart", payload); + } + + @ReactMethod + public void restart() { + torKmpManager = new TorKmpManager(context.getCurrentActivity().getApplication()); + torKmpManager.getTorOperationManager().restartQuietly(); + WritableMap payload = Arguments.createMap(); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorRestart", payload); + } + + @ReactMethod + public void newIdentity() { + torKmpManager.newIdentity(context.getCurrentActivity().getApplication()); + WritableMap payload = Arguments.createMap(); + context + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("TorNewIdentity", payload); + } +} diff --git a/mobile/android/app/src/main/java/com/robosats/tor/EnumTorState.kt b/mobile/android/app/src/main/java/com/robosats/tor/EnumTorState.kt new file mode 100644 index 00000000..8ddc7da5 --- /dev/null +++ b/mobile/android/app/src/main/java/com/robosats/tor/EnumTorState.kt @@ -0,0 +1,8 @@ +package com.robosats.tor + +enum class EnumTorState { + STARTING, + ON, + STOPPING, + OFF +} diff --git a/mobile/android/app/src/main/java/com/robosats/tor/TorKmpManager.kt b/mobile/android/app/src/main/java/com/robosats/tor/TorKmpManager.kt new file mode 100644 index 00000000..bed7fbc5 --- /dev/null +++ b/mobile/android/app/src/main/java/com/robosats/tor/TorKmpManager.kt @@ -0,0 +1,389 @@ +package com.robosats.tor + +import android.app.Application +import android.util.Log +import android.widget.Toast +import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData +import io.matthewnelson.kmp.tor.KmpTorLoaderAndroid +import io.matthewnelson.kmp.tor.TorConfigProviderAndroid +import io.matthewnelson.kmp.tor.common.address.* +import io.matthewnelson.kmp.tor.controller.common.config.TorConfig +import io.matthewnelson.kmp.tor.controller.common.config.TorConfig.Option.* +import io.matthewnelson.kmp.tor.controller.common.config.TorConfig.Setting.* +import io.matthewnelson.kmp.tor.controller.common.control.usecase.TorControlInfoGet +import io.matthewnelson.kmp.tor.controller.common.control.usecase.TorControlSignal +import io.matthewnelson.kmp.tor.controller.common.events.TorEvent +import io.matthewnelson.kmp.tor.manager.TorManager +import io.matthewnelson.kmp.tor.manager.TorServiceConfig +import io.matthewnelson.kmp.tor.manager.common.TorControlManager +import io.matthewnelson.kmp.tor.manager.common.TorOperationManager +import io.matthewnelson.kmp.tor.manager.common.event.TorManagerEvent +import io.matthewnelson.kmp.tor.manager.common.state.isOff +import io.matthewnelson.kmp.tor.manager.common.state.isOn +import io.matthewnelson.kmp.tor.manager.common.state.isStarting +import io.matthewnelson.kmp.tor.manager.common.state.isStopping +import io.matthewnelson.kmp.tor.manager.R +import kotlinx.coroutines.* +import java.net.InetSocketAddress +import java.net.Proxy + +class TorKmpManager(application : Application) { + + private val TAG = "TorListener" + + private val providerAndroid by lazy { + object : TorConfigProviderAndroid(context = application) { + override fun provide(): TorConfig { + return TorConfig.Builder { + // Set multiple ports for all of the things + val dns = Ports.Dns() + put(dns.set(AorDorPort.Value(PortProxy(9252)))) + put(dns.set(AorDorPort.Value(PortProxy(9253)))) + + val socks = Ports.Socks() + put(socks.set(AorDorPort.Value(PortProxy(9254)))) + put(socks.set(AorDorPort.Value(PortProxy(9255)))) + + val http = Ports.HttpTunnel() + put(http.set(AorDorPort.Value(PortProxy(9258)))) + put(http.set(AorDorPort.Value(PortProxy(9259)))) + + val trans = Ports.Trans() + put(trans.set(AorDorPort.Value(PortProxy(9262)))) + put(trans.set(AorDorPort.Value(PortProxy(9263)))) + + // If a port (9263) is already taken (by ^^^^ trans port above) + // this will take its place and "overwrite" the trans port entry + // because port 9263 is taken. + put(socks.set(AorDorPort.Value(PortProxy(9263)))) + + // Set Flags + socks.setFlags(setOf( + Ports.Socks.Flag.OnionTrafficOnly + )).setIsolationFlags(setOf( + Ports.IsolationFlag.IsolateClientAddr, + )).set(AorDorPort.Value(PortProxy(9264))) + put(socks) + + // reset our socks object to defaults + socks.setDefault() + + // Not necessary, as if ControlPort is missing it will be + // automatically added for you; but for demonstration purposes... +// put(Ports.Control().set(AorDorPort.Auto)) + + // Use a UnixSocket instead of TCP for the ControlPort. + // + // A unix domain socket will always be preferred on Android + // if neither Ports.Control or UnixSockets.Control are provided. + put(UnixSockets.Control().set(FileSystemFile( + workDir.builder { + + // Put the file in the "data" directory + // so that we avoid any directory permission + // issues. + // + // Note that DataDirectory is automatically added + // for you if it is not present in your provided + // config. If you set a custom Path for it, you + // should use it here. + addSegment(DataDirectory.DEFAULT_NAME) + + addSegment(UnixSockets.Control.DEFAULT_NAME) + } + ))) + + // Use a UnixSocket instead of TCP for the SocksPort. + put(UnixSockets.Socks().set(FileSystemFile( + workDir.builder { + + // Put the file in the "data" directory + // so that we avoid any directory permission + // issues. + // + // Note that DataDirectory is automatically added + // for you if it is not present in your provided + // config. If you set a custom Path for it, you + // should use it here. + addSegment(DataDirectory.DEFAULT_NAME) + + addSegment(UnixSockets.Socks.DEFAULT_NAME) + } + ))) + + // For Android, disabling & reducing connection padding is + // advisable to minimize mobile data usage. + put(ConnectionPadding().set(AorTorF.False)) + put(ConnectionPaddingReduced().set(TorF.True)) + + // Tor default is 24h. Reducing to 10 min helps mitigate + // unnecessary mobile data usage. + put(DormantClientTimeout().set(Time.Minutes(10))) + + // Tor defaults this setting to false which would mean if + // Tor goes dormant, the next time it is started it will still + // be in the dormant state and will not bootstrap until being + // set to "active". This ensures that if it is a fresh start, + // dormancy will be cancelled automatically. + put(DormantCanceledByStartup().set(TorF.True)) + + // If planning to use v3 Client Authentication in a persistent + // manner (where private keys are saved to disk via the "Persist" + // flag), this is needed to be set. + put(ClientOnionAuthDir().set(FileSystemDir( + workDir.builder { addSegment(ClientOnionAuthDir.DEFAULT_NAME) } + ))) + + val hsPath = workDir.builder { + addSegment(HiddenService.DEFAULT_PARENT_DIR_NAME) + addSegment("test_service") + } + // Add Hidden services + put(HiddenService() + .setPorts(ports = setOf( + // Use a unix domain socket to communicate via IPC instead of over TCP + HiddenService.UnixSocket(virtualPort = Port(80), targetUnixSocket = hsPath.builder { + addSegment(HiddenService.UnixSocket.DEFAULT_UNIX_SOCKET_NAME) + }), + )) + .setMaxStreams(maxStreams = HiddenService.MaxStreams(value = 2)) + .setMaxStreamsCloseCircuit(value = TorF.True) + .set(FileSystemDir(path = hsPath)) + ) + + put(HiddenService() + .setPorts(ports = setOf( + HiddenService.Ports(virtualPort = Port(80), targetPort = Port(1030)), // http + HiddenService.Ports(virtualPort = Port(443), targetPort = Port(1030)) // https + )) + .set(FileSystemDir(path = + workDir.builder { + addSegment(HiddenService.DEFAULT_PARENT_DIR_NAME) + addSegment("test_service_2") + } + )) + ) + }.build() + } + } + } + + private val loaderAndroid by lazy { + KmpTorLoaderAndroid(provider = providerAndroid) + } + + private val manager: TorManager by lazy { + TorManager.newInstance(application = application, loader = loaderAndroid, requiredEvents = null) + } + + // only expose necessary interfaces + val torOperationManager: TorOperationManager get() = manager + val torControlManager: TorControlManager get() = manager + + private val listener = TorListener() + + val events: LiveData get() = listener.eventLines + + private val appScope by lazy { + CoroutineScope(Dispatchers.Main.immediate + SupervisorJob()) + } + + val torStateLiveData: MutableLiveData = MutableLiveData() + get() = field + var torState: TorState = TorState() + get() = field + + var proxy: Proxy? = null + get() = field + + init { + manager.debug(true) + manager.addListener(listener) + listener.addLine(TorServiceConfig.getMetaData(application).toString()) + } + + fun isConnected(): Boolean { + return manager.state.isOn() && manager.state.bootstrap >= 100 + } + + fun isStarting(): Boolean { + return manager.state.isStarting() || + (manager.state.isOn() && manager.state.bootstrap < 100); + } + + + fun newIdentity(appContext: Application) { + appScope.launch { + val result = manager.signal(TorControlSignal.Signal.NewNym) + result.onSuccess { + if (it !is String) { + listener.addLine(TorControlSignal.NEW_NYM_SUCCESS) + Toast.makeText(appContext, TorControlSignal.NEW_NYM_SUCCESS, Toast.LENGTH_SHORT).show() + return@onSuccess + } + + val post: String? = when { + it.startsWith(TorControlSignal.NEW_NYM_RATE_LIMITED) -> { + // Rate limiting NEWNYM request: delaying by 8 second(s) + val seconds: Int? = it.drop(TorControlSignal.NEW_NYM_RATE_LIMITED.length) + .substringBefore(' ') + .toIntOrNull() + + if (seconds == null) { + it + } else { + appContext.getString( + R.string.kmp_tor_newnym_rate_limited, + seconds + ) + } + } + it == TorControlSignal.NEW_NYM_SUCCESS -> { + appContext.getString(R.string.kmp_tor_newnym_success) + } + else -> { + null + } + } + + if (post != null) { + listener.addLine(post) + Toast.makeText(appContext, post, Toast.LENGTH_SHORT).show() + } + } + result.onFailure { + val msg = "Tor identity change failed" + listener.addLine(msg) + Toast.makeText(appContext, msg, Toast.LENGTH_SHORT).show() + } + } + } + + + private inner class TorListener: TorManagerEvent.Listener() { + private val _eventLines: MutableLiveData = MutableLiveData("") + val eventLines: LiveData = _eventLines + private val events: MutableList = ArrayList(50) + fun addLine(line: String) { + synchronized(this) { + if (events.size > 49) { + events.removeAt(0) + } + events.add(line) + //Log.i(TAG, line) + //_eventLines.value = events.joinToString("\n") + _eventLines.postValue(events.joinToString("\n")) + } + } + + override fun onEvent(event: TorManagerEvent) { + + if (event is TorManagerEvent.State) { + val stateEvent: TorManagerEvent.State = event + val state = stateEvent.torState + torState.progressIndicator = state.bootstrap + val liveTorState = TorState() + liveTorState.progressIndicator = state.bootstrap + + if (state.isOn()) { + if (state.bootstrap >= 100) { + torState.state = EnumTorState.ON + liveTorState.state = EnumTorState.ON + } else { + torState.state = EnumTorState.STARTING + liveTorState.state = EnumTorState.STARTING + } + } else if (state.isStarting()) { + torState.state = EnumTorState.STARTING + liveTorState.state = EnumTorState.STARTING + } else if (state.isOff()) { + torState.state = EnumTorState.OFF + liveTorState.state = EnumTorState.OFF + } else if (state.isStopping()) { + torState.state = EnumTorState.STOPPING + liveTorState.state = EnumTorState.STOPPING + } + torStateLiveData.postValue(liveTorState) + } + addLine(event.toString()) + super.onEvent(event) + } + + override fun onEvent(event: TorEvent.Type.SingleLineEvent, output: String) { + addLine("$event - $output") + + super.onEvent(event, output) + } + + override fun onEvent(event: TorEvent.Type.MultiLineEvent, output: List) { + addLine("multi-line event: $event. See Logs.") + + // these events are many many many lines and should be moved + // off the main thread if ever needed to be dealt with. + val enabled = false + if (enabled) { + appScope.launch(Dispatchers.IO) { + Log.d(TAG, "-------------- multi-line event START: $event --------------") + for (line in output) { + Log.d(TAG, line) + } + Log.d(TAG, "--------------- multi-line event END: $event ---------------") + } + } + + super.onEvent(event, output) + } + + override fun managerEventError(t: Throwable) { + t.printStackTrace() + } + + override fun managerEventAddressInfo(info: TorManagerEvent.AddressInfo) { + if (info.isNull) { + // Tear down HttpClient + } else { + info.socksInfoToProxyAddressOrNull()?.firstOrNull()?.let { proxyAddress -> + @Suppress("UNUSED_VARIABLE") + val socket = InetSocketAddress(proxyAddress.address.value, proxyAddress.port.value) + proxy = Proxy(Proxy.Type.SOCKS, socket) + } + } + } + + override fun managerEventStartUpCompleteForTorInstance() { + // Do one-time things after we're bootstrapped + + appScope.launch { + torControlManager.onionAddNew( + type = OnionAddress.PrivateKey.Type.ED25519_V3, + hsPorts = setOf(HiddenService.Ports(virtualPort = Port(443))), + flags = null, + maxStreams = null, + ).onSuccess { hsEntry -> + addLine( + "New HiddenService: " + + "\n - Address: https://${hsEntry.address.canonicalHostname()}" + + "\n - PrivateKey: ${hsEntry.privateKey}" + ) + + torControlManager.onionDel(hsEntry.address).onSuccess { + addLine("Aaaaaaaaand it's gone...") + }.onFailure { t -> + t.printStackTrace() + } + }.onFailure { t -> + t.printStackTrace() + } + + delay(20_000L) + + torControlManager.infoGet(TorControlInfoGet.KeyWord.Uptime()).onSuccess { uptime -> + addLine("Uptime - $uptime") + }.onFailure { t -> + t.printStackTrace() + } + } + } + } +} diff --git a/mobile/android/app/src/main/java/com/robosats/tor/TorState.kt b/mobile/android/app/src/main/java/com/robosats/tor/TorState.kt new file mode 100644 index 00000000..51052571 --- /dev/null +++ b/mobile/android/app/src/main/java/com/robosats/tor/TorState.kt @@ -0,0 +1,14 @@ +package com.robosats.tor + +class TorState { + var state : EnumTorState = EnumTorState.OFF + get() = field + set(value) { + field = value + } + var progressIndicator : Int = 0 + get() = field + set(value) { + field = value + } +} diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle index 322d3562..19e52517 100644 --- a/mobile/android/build.gradle +++ b/mobile/android/build.gradle @@ -9,7 +9,6 @@ buildscript { compileSdkVersion = 33 targetSdkVersion = 33 kotlin_version = "1.8.21" - kotlinVersion = "1.8.21" //for react-native-tor if (System.properties['os.arch'] == "aarch64") { // For M1 Users we need to use the NDK 24 which added support for aarch64 diff --git a/mobile/package-lock.json b/mobile/package-lock.json index 4253c61c..42b1a450 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -13,7 +13,6 @@ "react": "18.2.0", "react-native": "^0.71.8", "react-native-encrypted-storage": "^4.0.3", - "react-native-tor": "^0.1.8", "react-native-webview": "^13.3.0" }, "devDependencies": { diff --git a/mobile/package.json b/mobile/package.json index d494ad28..ca8861d3 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -17,7 +17,6 @@ "react": "18.2.0", "react-native": "^0.71.8", "react-native-encrypted-storage": "^4.0.3", - "react-native-tor": "^0.1.8", "react-native-webview": "^13.3.0" }, "devDependencies": { diff --git a/mobile/services/Tor/index.ts b/mobile/services/Tor/index.ts index 35b4f2c4..ec8d9df6 100644 --- a/mobile/services/Tor/index.ts +++ b/mobile/services/Tor/index.ts @@ -1,29 +1,14 @@ -import Tor from 'react-native-tor'; +// import Tor from 'react-native-tor'; + +import TorModule from '../../lib/native/TorModule'; class TorClient { - daemon: ReturnType; + daemon: object; constructor() { - this.daemon = Tor({ - stopDaemonOnBackground: false, - numberConcurrentRequests: 0, - }); + this.daemon = {}; } - private readonly connectDaemon: () => void = async () => { - try { - this.daemon.startIfNotStarted(); - } catch { - console.log('TOR already started'); - } - }; - - public reset: () => void = async () => { - console.log('Reset TOR'); - await this.daemon.stopIfRunning(); - await this.daemon.startIfNotStarted(); - }; - public get: (baseUrl: string, path: string, headers: object) => Promise = async ( baseUrl, path, @@ -31,9 +16,13 @@ class TorClient { ) => { return await new Promise(async (resolve, reject) => { try { - const response = await this.daemon.get(`${baseUrl}${path}`, headers); - - resolve(response); + const response = await TorModule.sendRequest( + 'GET', + `${baseUrl}${path}`, + JSON.stringify(headers), + '{}', + ); + resolve(JSON.parse(response)); } catch (error) { reject(error); } @@ -47,9 +36,13 @@ class TorClient { ) => { return await new Promise(async (resolve, reject) => { try { - const response = await this.daemon.delete(`${baseUrl}${path}`, '', headers); - - resolve(response); + const response = await TorModule.sendRequest( + 'DELETE', + `${baseUrl}${path}`, + JSON.stringify(headers), + '{}', + ); + resolve(JSON.parse(response)); } catch (error) { reject(error); } @@ -62,13 +55,12 @@ class TorClient { ) => { return await new Promise(async (resolve, reject) => { try { - const response = await this.daemon - .request(`${baseUrl}${path}`, 'GET', '', {}, true) - .then((resp) => { - resolve(resp); - }); - - resolve(response); + // const response = await this.daemon + // .request(`${baseUrl}${path}`, 'GET', '', {}, true) + // .then((resp) => { + // resolve(resp); + // }); + // resolve(response); } catch (error) { reject(error); } @@ -80,9 +72,13 @@ class TorClient { return await new Promise(async (resolve, reject) => { try { const json = JSON.stringify(body); - const response = await this.daemon.post(`${baseUrl}${path}`, json, headers); - - resolve(response); + const response = await TorModule.sendRequest( + 'POST', + `${baseUrl}${path}`, + JSON.stringify(headers), + json, + ); + resolve(JSON.parse(response)); } catch (error) { reject(error); } From d8490d7530f25e6752590369909adc68351e039d Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Thu, 28 Mar 2024 23:21:15 +0100 Subject: [PATCH 36/42] Improve Federation start order --- .../src/components/SettingsForm/index.tsx | 1 - frontend/src/contexts/FederationContext.tsx | 23 +++++---- frontend/src/models/Coordinator.model.ts | 25 ++-------- frontend/src/models/Federation.model.ts | 48 +++++++------------ frontend/src/services/Native/index.d.ts | 2 +- .../src/services/api/ApiNativeClient/index.ts | 35 -------------- frontend/src/services/api/index.ts | 1 - mobile/App.tsx | 9 ---- .../java/com/robosats/modules/TorModule.java | 2 +- 9 files changed, 33 insertions(+), 113 deletions(-) diff --git a/frontend/src/components/SettingsForm/index.tsx b/frontend/src/components/SettingsForm/index.tsx index 7d1f149d..1624675b 100644 --- a/frontend/src/components/SettingsForm/index.tsx +++ b/frontend/src/components/SettingsForm/index.tsx @@ -226,7 +226,6 @@ const SettingsForm = ({ dense = false }: SettingsFormProps): JSX.Element => { value={settings.network} onChange={(e, network) => { setSettings({ ...settings, network }); - void federation.updateUrls(origin, { ...settings, network }, hostUrl); systemClient.setItem('settings_network', network); }} > diff --git a/frontend/src/contexts/FederationContext.tsx b/frontend/src/contexts/FederationContext.tsx index 4ba69a1d..dc146e0d 100644 --- a/frontend/src/contexts/FederationContext.tsx +++ b/frontend/src/contexts/FederationContext.tsx @@ -9,7 +9,7 @@ import React, { type ReactNode, } from 'react'; -import { type Order, Federation } from '../models'; +import { type Order, Federation, Settings } from '../models'; import { federationLottery } from '../utils'; @@ -62,7 +62,7 @@ export interface UseFederationStoreType { } export const initialFederationContext: UseFederationStoreType = { - federation: new Federation(), + federation: new Federation('onion', new Settings(), ''), sortedCoordinators: [], setDelay: () => {}, currentOrderId: { id: null, shortAlias: null }, @@ -80,7 +80,7 @@ export const FederationContextProvider = ({ const { settings, page, origin, hostUrl, open, torStatus } = useContext(AppContext); const { setMaker, garage, setBadOrder } = useContext(GarageContext); - const [federation, setFederation] = useState(initialFederationContext.federation); + const [federation] = useState(new Federation(origin, settings, hostUrl)); const sortedCoordinators = useMemo(() => federationLottery(federation), []); const [coordinatorUpdatedAt, setCoordinatorUpdatedAt] = useState( new Date().toISOString(), @@ -102,20 +102,19 @@ export const FederationContextProvider = ({ setMaker((maker) => { return { ...maker, coordinator: sortedCoordinators[0] }; }); // default MakerForm coordinator is decided via sorted lottery + federation.registerHook('onFederationUpdate', () => { + setFederationUpdatedAt(new Date().toISOString()); + }); + federation.registerHook('onCoordinatorUpdate', () => { + setCoordinatorUpdatedAt(new Date().toISOString()); + }); }, []); useEffect(() => { // On bitcoin network change we reset book, limits and federation info and fetch everything again if (window.NativeRobosats === undefined || torStatus === 'ON') { - const newFed = initialFederationContext.federation; - newFed.registerHook('onFederationUpdate', () => { - setFederationUpdatedAt(new Date().toISOString()); - }); - newFed.registerHook('onCoordinatorUpdate', () => { - setCoordinatorUpdatedAt(new Date().toISOString()); - }); - void newFed.start(origin, settings, hostUrl); - setFederation(newFed); + void federation.updateUrl(origin, settings, hostUrl); + void federation.update(); } }, [settings.network, torStatus]); diff --git a/frontend/src/models/Coordinator.model.ts b/frontend/src/models/Coordinator.model.ts index 7ba2be53..e8d8bcf0 100644 --- a/frontend/src/models/Coordinator.model.ts +++ b/frontend/src/models/Coordinator.model.ts @@ -97,7 +97,7 @@ function calculateSizeLimit(inputDate: Date): number { } export class Coordinator { - constructor(value: any) { + constructor(value: any, origin: Origin, settings: Settings, hostUrl: string) { const established = new Date(value.established); this.longAlias = value.longAlias; this.shortAlias = value.shortAlias; @@ -115,6 +115,8 @@ export class Coordinator { this.testnetNodesPubkeys = value.testnetNodesPubkeys; this.url = ''; this.basePath = ''; + + this.updateUrl(origin, settings, hostUrl); } // These properties are loaded from federation.json @@ -145,22 +147,7 @@ export class Coordinator { public loadingLimits: boolean = false; public loadingRobot: boolean = true; - start = async ( - origin: Origin, - settings: Settings, - hostUrl: string, - onUpdate: (shortAlias: string) => void = () => {}, - ): Promise => { - if (this.enabled !== true) return; - void this.updateUrl(settings, origin, hostUrl, onUpdate); - }; - - updateUrl = async ( - settings: Settings, - origin: Origin, - hostUrl: string, - onUpdate: (shortAlias: string) => void = () => {}, - ): Promise => { + updateUrl = (origin: Origin, settings: Settings, hostUrl: string): void => { if (settings.selfhostedClient && this.shortAlias !== 'local') { this.url = hostUrl; this.basePath = `/${settings.network}/${this.shortAlias}`; @@ -168,9 +155,6 @@ export class Coordinator { this.url = String(this[settings.network][origin]); this.basePath = ''; } - void this.update(() => { - onUpdate(this.shortAlias); - }); }; update = async (onUpdate: (shortAlias: string) => void = () => {}): Promise => { @@ -205,7 +189,6 @@ export class Coordinator { apiClient .get(this.url, `${this.basePath}/api/book/`) .then((data) => { - console.log('BOOK', data); if (!data?.not_found) { this.book = (data as PublicOrder[]).map((order) => { order.coordinatorShortAlias = this.shortAlias; diff --git a/frontend/src/models/Federation.model.ts b/frontend/src/models/Federation.model.ts index 4b26623c..7f72531e 100644 --- a/frontend/src/models/Federation.model.ts +++ b/frontend/src/models/Federation.model.ts @@ -14,14 +14,14 @@ import { updateExchangeInfo } from './Exchange.model'; type FederationHooks = 'onCoordinatorUpdate' | 'onFederationUpdate'; export class Federation { - constructor() { + constructor(origin: Origin, settings: Settings, hostUrl: string) { this.coordinators = Object.entries(defaultFederation).reduce( (acc: Record, [key, value]: [string, any]) => { if (getHost() !== '127.0.0.1:8000' && key === 'local') { // Do not add `Local Dev` unless it is running on localhost return acc; } else { - acc[key] = new Coordinator(value); + acc[key] = new Coordinator(value, origin, settings, hostUrl); return acc; } }, @@ -36,7 +36,16 @@ export class Federation { onCoordinatorUpdate: [], onFederationUpdate: [], }; + this.loading = true; + this.exchange.loadingCoordinators = Object.keys(this.coordinators).length; + + const host = getHost(); + const url = `${window.location.protocol}//${host}`; + const tesnetHost = Object.values(this.coordinators).find((coor) => { + return Object.values(coor.testnet).includes(url); + }); + if (tesnetHost) settings.network = 'testnet'; } public coordinators: Record; @@ -69,38 +78,10 @@ export class Federation { this.triggerHook('onFederationUpdate'); }; - // Setup - start = async (origin: Origin, settings: Settings, hostUrl: string): Promise => { - const onCoordinatorStarted = (): void => { - this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1; - this.onCoordinatorSaved(); - }; - - this.loading = true; - this.exchange.loadingCoordinators = Object.keys(this.coordinators).length; - - const host = getHost(); - const url = `${window.location.protocol}//${host}`; - const tesnetHost = Object.values(this.coordinators).find((coor) => { - return Object.values(coor.testnet).includes(url); - }); - if (tesnetHost) settings.network = 'testnet'; - + updateUrl = async (origin: Origin, settings: Settings, hostUrl: string): Promise => { for (const coor of Object.values(this.coordinators)) { - if (coor.enabled) { - await coor.start(origin, settings, hostUrl, onCoordinatorStarted); - } + coor.updateUrl(origin, settings, hostUrl); } - this.updateEnabledCoordinators(); - }; - - // On Testnet/Mainnet change - updateUrls = async (origin: Origin, settings: Settings, hostUrl: string): Promise => { - this.loading = true; - for (const coor of Object.values(this.coordinators)) { - await coor.updateUrl(settings, origin, hostUrl); - } - this.loading = false; }; update = async (): Promise => { @@ -115,9 +96,12 @@ export class Federation { lifetime_volume: 0, version: { major: 0, minor: 0, patch: 0 }, }; + this.exchange.onlineCoordinators = 0; this.exchange.loadingCoordinators = Object.keys(this.coordinators).length; + this.updateEnabledCoordinators(); for (const coor of Object.values(this.coordinators)) { await coor.update(() => { + this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1; this.onCoordinatorSaved(); }); } diff --git a/frontend/src/services/Native/index.d.ts b/frontend/src/services/Native/index.d.ts index e93edd55..e7dc6f68 100644 --- a/frontend/src/services/Native/index.d.ts +++ b/frontend/src/services/Native/index.d.ts @@ -15,7 +15,7 @@ export interface ReactNativeWebView { export interface NativeWebViewMessageHttp { id?: number; category: 'http'; - type: 'post' | 'get' | 'put' | 'delete' | 'xhr'; + type: 'post' | 'get' | 'put' | 'delete'; path: string; baseUrl: string; headers?: object; diff --git a/frontend/src/services/api/ApiNativeClient/index.ts b/frontend/src/services/api/ApiNativeClient/index.ts index bea3a46f..9ab27d91 100644 --- a/frontend/src/services/api/ApiNativeClient/index.ts +++ b/frontend/src/services/api/ApiNativeClient/index.ts @@ -90,41 +90,6 @@ class ApiNativeClient implements ApiClient { headers: this.getHeaders(auth), }).then(this.parseResponse); }; - - public fileImageUrl: (baseUrl: string, path: string) => Promise = async ( - baseUrl, - path, - ) => { - if (path === '') { - return await Promise.resolve(''); - } - - if (this.assetsCache[path] != null) { - return await Promise.resolve(this.assetsCache[path]); - } else if (this.assetsPromises.has(path)) { - return await this.assetsPromises.get(path); - } - - this.assetsPromises.set( - path, - new Promise((resolve, reject) => { - window.NativeRobosats?.postMessage({ - category: 'http', - type: 'xhr', - baseUrl, - path, - }) - .then((fileB64: { b64Data: string }) => { - this.assetsCache[path] = `data:image/png;base64,${fileB64.b64Data}`; - this.assetsPromises.delete(path); - resolve(this.assetsCache[path]); - }) - .catch(reject); - }), - ); - - return await this.assetsPromises.get(path); - }; } export default ApiNativeClient; diff --git a/frontend/src/services/api/index.ts b/frontend/src/services/api/index.ts index b9ac94d8..d0013324 100644 --- a/frontend/src/services/api/index.ts +++ b/frontend/src/services/api/index.ts @@ -11,7 +11,6 @@ export interface ApiClient { put: (baseUrl: string, path: string, body: object, auth?: Auth) => Promise; get: (baseUrl: string, path: string, auth?: Auth) => Promise; delete: (baseUrl: string, path: string, auth?: Auth) => Promise; - fileImageUrl?: (baseUrl: string, path: string) => Promise; } export const apiClient: ApiClient = diff --git a/mobile/App.tsx b/mobile/App.tsx index 5d6b5769..b80d1e8a 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -23,7 +23,6 @@ const App = () => { useEffect(() => { TorModule.start(); DeviceEventEmitter.addListener('TorStatus', (payload) => { - console.log(payload.torStatus); if (payload.torStatus === 'OFF') TorModule.restart(); injectMessage({ category: 'system', @@ -119,14 +118,6 @@ const App = () => { }) .catch((e) => onCatch(data.id, e)) .finally(TorModule.getTorStatus); - } else if (data.type === 'xhr') { - torClient - .request(data.baseUrl, data.path) - .then((response: object) => { - injectMessageResolve(data.id, response); - }) - .catch((e) => onCatch(data.id, e)) - .finally(TorModule.getTorStatus); } } else if (data.category === 'system') { if (data.type === 'init') { diff --git a/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java b/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java index ff60f9d0..0705c347 100644 --- a/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java +++ b/mobile/android/app/src/main/java/com/robosats/modules/TorModule.java @@ -85,7 +85,7 @@ public class TorModule extends ReactContextBaseJavaModule { throw new RuntimeException(e); } }); - if (response.code() != 200) { + if (response.code() != 200 && response.code() != 201) { Log.d("RobosatsError", "Request error code: " + response.code()); } else if (response.isSuccessful()) { promise.resolve("{\"json\":" + body + ", \"headers\": " + headersJson +"}"); From 383112dc90ae484e5f46f19a221096e261569d81 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Thu, 28 Mar 2024 23:29:27 +0100 Subject: [PATCH 37/42] Recover WebWorkers --- .../RobotAvatar/RobohashGenerator.ts | 9 ++---- .../components/RobotAvatar/robohash.worker.ts | 31 +++++++++---------- frontend/src/models/Slot.model.ts | 6 ++-- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/RobotAvatar/RobohashGenerator.ts b/frontend/src/components/RobotAvatar/RobohashGenerator.ts index 36257efa..038cdf92 100644 --- a/frontend/src/components/RobotAvatar/RobohashGenerator.ts +++ b/frontend/src/components/RobotAvatar/RobohashGenerator.ts @@ -26,10 +26,9 @@ class RoboGenerator { const numCores = 8; for (let i = 0; i < numCores; i++) { - // FIXME - // const worker = new Worker(new URL('./robohash.worker.ts', import.meta.url)); - // worker.onmessage = this.assignTasksToWorkers.bind(this); - // this.workers.push({ worker, busy: false }); + const worker = new Worker(new URL('./robohash.worker.ts', import.meta.url)); + worker.onmessage = this.assignTasksToWorkers.bind(this); + this.workers.push({ worker, busy: false }); } } @@ -82,8 +81,6 @@ class RoboGenerator { hash, size, ) => { - // FIXME - return ''; const cacheKey = `${size}px;${hash}`; if (this.assetsCache[cacheKey]) { return this.assetsCache[cacheKey]; diff --git a/frontend/src/components/RobotAvatar/robohash.worker.ts b/frontend/src/components/RobotAvatar/robohash.worker.ts index b8a513ad..f0c7da33 100644 --- a/frontend/src/components/RobotAvatar/robohash.worker.ts +++ b/frontend/src/components/RobotAvatar/robohash.worker.ts @@ -1,18 +1,17 @@ -// FIXME -// import { async_generate_robohash } from 'robo-identities-wasm'; +import { async_generate_robohash } from 'robo-identities-wasm'; -// // Listen for messages from the main thread -// self.addEventListener('message', (event) => { -// void (async () => { -// const { hash, size, cacheKey } = event.data; +// Listen for messages from the main thread +self.addEventListener('message', (event) => { + void (async () => { + const { hash, size, cacheKey } = event.data; -// // Generate the image using async_image_base -// const t0 = performance.now(); -// const avatarB64: string = await async_generate_robohash(hash, size === 'small' ? 80 : 256); -// const imageUrl = `data:image/png;base64,${avatarB64}`; -// const t1 = performance.now(); -// console.log(`Avatar generated in: ${t1 - t0} ms`); -// // Send the result back to the main thread -// self.postMessage({ cacheKey, imageUrl }); -// })(); -// }); + // Generate the image using async_image_base + const t0 = performance.now(); + const avatarB64: string = await async_generate_robohash(hash, size === 'small' ? 80 : 256); + const imageUrl = `data:image/png;base64,${avatarB64}`; + const t1 = performance.now(); + console.log(`Avatar generated in: ${t1 - t0} ms`); + // Send the result back to the main thread + self.postMessage({ cacheKey, imageUrl }); + })(); +}); diff --git a/frontend/src/models/Slot.model.ts b/frontend/src/models/Slot.model.ts index 9936e7eb..864820ed 100644 --- a/frontend/src/models/Slot.model.ts +++ b/frontend/src/models/Slot.model.ts @@ -1,16 +1,14 @@ import { sha256 } from 'js-sha256'; import { Robot, type Order } from '.'; import { robohash } from '../components/RobotAvatar/RobohashGenerator'; -// import { generate_roboname } from 'robo-identities-wasm'; +import { generate_roboname } from 'robo-identities-wasm'; class Slot { constructor(token: string, shortAliases: string[], robotAttributes: Record) { this.token = token; this.hashId = sha256(sha256(this.token)); - // FIXME - // this.nickname = generate_roboname(this.hashId); - this.nickname = 'Robot'; + this.nickname = generate_roboname(this.hashId); // trigger RoboHash avatar generation in webworker and store in RoboHash class cache. void robohash.generate(this.hashId, 'small'); void robohash.generate(this.hashId, 'large'); From 253f3bf6c0d223368324b08e6600355abb9aeecf Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Thu, 28 Mar 2024 23:38:40 +0100 Subject: [PATCH 38/42] Remove react-native-tor --- mobile/android/app/src/main/AndroidManifest.xml | 3 ++- mobile/package-lock.json | 16 ---------------- mobile/services/Tor/index.ts | 2 -- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml index 73b27807..f76cd699 100644 --- a/mobile/android/app/src/main/AndroidManifest.xml +++ b/mobile/android/app/src/main/AndroidManifest.xml @@ -10,8 +10,9 @@ android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:usesCleartextTraffic="true" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" android:extractNativeLibs="true" + > Date: Thu, 28 Mar 2024 23:45:54 +0100 Subject: [PATCH 39/42] Remove deprecated code --- mobile/services/Tor/index.ts | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/mobile/services/Tor/index.ts b/mobile/services/Tor/index.ts index f83079cc..45986169 100644 --- a/mobile/services/Tor/index.ts +++ b/mobile/services/Tor/index.ts @@ -1,12 +1,6 @@ import TorModule from '../../lib/native/TorModule'; class TorClient { - daemon: object; - - constructor() { - this.daemon = {}; - } - public get: (baseUrl: string, path: string, headers: object) => Promise = async ( baseUrl, path, @@ -47,24 +41,6 @@ class TorClient { }); }; - public request: (baseUrl: string, path: string) => Promise = async ( - baseUrl: string, - path, - ) => { - return await new Promise(async (resolve, reject) => { - try { - // const response = await this.daemon - // .request(`${baseUrl}${path}`, 'GET', '', {}, true) - // .then((resp) => { - // resolve(resp); - // }); - // resolve(response); - } catch (error) { - reject(error); - } - }); - }; - public post: (baseUrl: string, path: string, body: object, headers: object) => Promise = async (baseUrl, path, body, headers) => { return await new Promise(async (resolve, reject) => { From f416d2ac176cd03666bb972b3955545d173d5ef4 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Fri, 29 Mar 2024 10:47:27 +0100 Subject: [PATCH 40/42] Fix loading line in Book --- frontend/src/components/BookTable/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index 9aa0d94b..5ae57a27 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -897,6 +897,11 @@ const BookTable = ({ : orders; }, [showControls, orders, fav, paymentMethods]); + const loadingPercentage = + ((federation.exchange.enabledCoordinators - federation.exchange.loadingCoordinators) / + federation.exchange.enabledCoordinators) * + 100; + if (!fullscreen) { return ( Date: Fri, 29 Mar 2024 20:05:50 +0100 Subject: [PATCH 41/42] Fix build --- mobile/App.tsx | 2 +- mobile/native/TorModule.ts | 11 +++++++++++ mobile/services/Tor/index.ts | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 mobile/native/TorModule.ts diff --git a/mobile/App.tsx b/mobile/App.tsx index b80d1e8a..e2bb3905 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -5,7 +5,7 @@ import TorClient from './services/Tor'; import Clipboard from '@react-native-clipboard/clipboard'; import EncryptedStorage from 'react-native-encrypted-storage'; import { name as app_name, version as app_version } from './package.json'; -import TorModule from './lib/native/TorModule'; +import TorModule from './native/TorModule'; const backgroundColors = { light: 'white', diff --git a/mobile/native/TorModule.ts b/mobile/native/TorModule.ts new file mode 100644 index 00000000..d071aeee --- /dev/null +++ b/mobile/native/TorModule.ts @@ -0,0 +1,11 @@ +import { NativeModules } from 'react-native'; +const { TorModule } = NativeModules; + +interface TorModuleInterface { + start: () => void; + restart: () => void; + getTorStatus: () => void; + sendRequest: (action: string, url: string, headers: string, body: string) => Promise; +} + +export default TorModule as TorModuleInterface; diff --git a/mobile/services/Tor/index.ts b/mobile/services/Tor/index.ts index 45986169..15e22d0a 100644 --- a/mobile/services/Tor/index.ts +++ b/mobile/services/Tor/index.ts @@ -1,4 +1,4 @@ -import TorModule from '../../lib/native/TorModule'; +import TorModule from '../../native/TorModule'; class TorClient { public get: (baseUrl: string, path: string, headers: object) => Promise = async ( From 10a5dee619514d49617b7aff744cbfd8588906ab Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 31 Mar 2024 16:16:24 +0100 Subject: [PATCH 42/42] Disable robo-identities --- frontend/src/components/RobotAvatar/index.tsx | 34 +++++++++---------- frontend/src/models/Coordinator.model.ts | 8 ++--- frontend/src/models/Slot.model.ts | 10 +++--- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/RobotAvatar/index.tsx b/frontend/src/components/RobotAvatar/index.tsx index c4992f8d..2ad86b83 100644 --- a/frontend/src/components/RobotAvatar/index.tsx +++ b/frontend/src/components/RobotAvatar/index.tsx @@ -3,7 +3,7 @@ import SmoothImage from 'react-smooth-image'; import { Avatar, Badge, Tooltip } from '@mui/material'; import { SendReceiveIcon } from '../Icons'; import placeholder from './placeholder.json'; -import { robohash } from './RobohashGenerator'; +// import { robohash } from './RobohashGenerator'; import { AppContext, type UseAppStoreType } from '../../contexts/AppContext'; interface Props { @@ -53,22 +53,22 @@ const RobotAvatar: React.FC = ({ const backgroundImage = `url(data:${backgroundData.mime};base64,${backgroundData.data})`; const className = placeholderType === 'loading' ? 'loadingAvatar' : 'generatingAvatar'; - useEffect(() => { - // TODO: HANDLE ANDROID AVATARS TOO (when window.NativeRobosats !== undefined) - if (hashId !== undefined) { - robohash - .generate(hashId, small ? 'small' : 'large') - .then((avatar) => { - setAvatarSrc(avatar); - }) - .catch(() => { - setAvatarSrc(''); - }); - setTimeout(() => { - setActiveBackground(false); - }, backgroundFadeTime); - } - }, [hashId]); + // useEffect(() => { + // // TODO: HANDLE ANDROID AVATARS TOO (when window.NativeRobosats !== undefined) + // if (hashId !== undefined) { + // robohash + // .generate(hashId, small ? 'small' : 'large') + // .then((avatar) => { + // setAvatarSrc(avatar); + // }) + // .catch(() => { + // setAvatarSrc(''); + // }); + // setTimeout(() => { + // setActiveBackground(false); + // }, backgroundFadeTime); + // } + // }, [hashId]); useEffect(() => { if (shortAlias !== undefined) { diff --git a/frontend/src/models/Coordinator.model.ts b/frontend/src/models/Coordinator.model.ts index e8d8bcf0..09e74a30 100644 --- a/frontend/src/models/Coordinator.model.ts +++ b/frontend/src/models/Coordinator.model.ts @@ -10,7 +10,7 @@ import { apiClient } from '../services/api'; import { validateTokenEntropy } from '../utils'; import { compareUpdateLimit } from './Limit.model'; import { defaultOrder } from './Order.model'; -import { robohash } from '../components/RobotAvatar/RobohashGenerator'; +// import { robohash } from '../components/RobotAvatar/RobohashGenerator'; export interface Contact { nostr?: string | undefined; @@ -174,9 +174,9 @@ export class Coordinator { }; generateAllMakerAvatars = async (data: [PublicOrder]): Promise => { - for (const order of data) { - void robohash.generate(order.maker_hash_id, 'small'); - } + // for (const order of data) { + // void robohash.generate(order.maker_hash_id, 'small'); + // } }; loadBook = (onDataLoad: () => void = () => {}): void => { diff --git a/frontend/src/models/Slot.model.ts b/frontend/src/models/Slot.model.ts index 864820ed..b043dd7b 100644 --- a/frontend/src/models/Slot.model.ts +++ b/frontend/src/models/Slot.model.ts @@ -1,17 +1,17 @@ import { sha256 } from 'js-sha256'; import { Robot, type Order } from '.'; -import { robohash } from '../components/RobotAvatar/RobohashGenerator'; -import { generate_roboname } from 'robo-identities-wasm'; +// import { robohash } from '../components/RobotAvatar/RobohashGenerator'; +// import { generate_roboname } from 'robo-identities-wasm'; class Slot { constructor(token: string, shortAliases: string[], robotAttributes: Record) { this.token = token; this.hashId = sha256(sha256(this.token)); - this.nickname = generate_roboname(this.hashId); + this.nickname = 'No Nick Display (WIP)'; // trigger RoboHash avatar generation in webworker and store in RoboHash class cache. - void robohash.generate(this.hashId, 'small'); - void robohash.generate(this.hashId, 'large'); + // void robohash.generate(this.hashId, 'small'); + // void robohash.generate(this.hashId, 'large'); this.robots = shortAliases.reduce((acc: Record, shortAlias: string) => { acc[shortAlias] = new Robot(robotAttributes);