From 45acef0816356e2dd8875f2606c321304888bb4e Mon Sep 17 00:00:00 2001 From: Daneryl Date: Mon, 23 Sep 2024 11:25:32 +0200 Subject: [PATCH 01/15] updated global.css with new tailwind --- app/react/App/styles/globals.css | 266 +++++++++++++++---------------- 1 file changed, 133 insertions(+), 133 deletions(-) diff --git a/app/react/App/styles/globals.css b/app/react/App/styles/globals.css index dca95d058a..beb79f6b66 100644 --- a/app/react/App/styles/globals.css +++ b/app/react/App/styles/globals.css @@ -1,5 +1,113 @@ +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(99 102 241 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(99 102 241 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + /* -! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com +! tailwindcss v3.4.12 | MIT License | https://tailwindcss.com */ /* @@ -211,6 +319,8 @@ textarea { /* 1 */ line-height: inherit; /* 1 */ + letter-spacing: inherit; + /* 1 */ color: inherit; /* 1 */ margin: 0; @@ -234,9 +344,9 @@ select { */ button, -[type='button'], -[type='reset'], -[type='submit'] { +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -885,106 +995,6 @@ input[type="range"]::-ms-fill-lower { font-family: 'Inter', sans-serif !important; } -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(99 102 241 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(99 102 241 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - .container { width: 100%; } @@ -1750,10 +1760,6 @@ input[type="range"]::-ms-fill-lower { margin-bottom: 1rem; } -.-ml-0 { - margin-left: -0px; -} - .-ml-0\.5 { margin-left: -0.125rem; } @@ -2402,12 +2408,6 @@ input[type="range"]::-ms-fill-lower { gap: 2rem; } -.space-x-0 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0px * var(--tw-space-x-reverse)); - margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse))); -} - .space-x-0\.5 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.125rem * var(--tw-space-x-reverse)); @@ -4134,97 +4134,97 @@ input[type="range"]::-ms-fill-lower { display: none; } -:is(.dark .dark\:border-gray-600) { +.dark\:border-gray-600:is(.dark *) { --tw-border-opacity: 1; border-color: rgb(75 85 99 / var(--tw-border-opacity)); } -:is(.dark .dark\:\!bg-primary-600) { +.dark\:\!bg-primary-600:is(.dark *) { --tw-bg-opacity: 1 !important; background-color: rgb(79 70 229 / var(--tw-bg-opacity)) !important; } -:is(.dark .dark\:\!bg-primary-700) { +.dark\:\!bg-primary-700:is(.dark *) { --tw-bg-opacity: 1 !important; background-color: rgb(67 56 202 / var(--tw-bg-opacity)) !important; } -:is(.dark .dark\:bg-blue-600) { +.dark\:bg-blue-600:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(79 70 229 / var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-gray-600) { +.dark\:bg-gray-600:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-gray-700) { +.dark\:bg-gray-700:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(55 65 81 / var(--tw-bg-opacity)); } -:is(.dark .dark\:bg-gray-800) { +.dark\:bg-gray-800:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(31 41 55 / var(--tw-bg-opacity)); } -:is(.dark .dark\:text-error-400) { +.dark\:text-error-400:is(.dark *) { --tw-text-opacity: 1; color: rgb(244 114 182 / var(--tw-text-opacity)); } -:is(.dark .dark\:text-gray-400) { +.dark\:text-gray-400:is(.dark *) { --tw-text-opacity: 1; color: rgb(156 163 175 / var(--tw-text-opacity)); } -:is(.dark .dark\:text-gray-500) { +.dark\:text-gray-500:is(.dark *) { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity)); } -:is(.dark .dark\:text-white) { +.dark\:text-white:is(.dark *) { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); } -:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder { +.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder { --tw-placeholder-opacity: 1; color: rgb(156 163 175 / var(--tw-placeholder-opacity)); } -:is(.dark .dark\:placeholder-gray-400)::placeholder { +.dark\:placeholder-gray-400:is(.dark *)::placeholder { --tw-placeholder-opacity: 1; color: rgb(156 163 175 / var(--tw-placeholder-opacity)); } -:is(.dark .dark\:hover\:\!bg-primary-700:hover) { +.dark\:hover\:\!bg-primary-700:hover:is(.dark *) { --tw-bg-opacity: 1 !important; background-color: rgb(67 56 202 / var(--tw-bg-opacity)) !important; } -:is(.dark .dark\:hover\:bg-blue-700:hover) { +.dark\:hover\:bg-blue-700:hover:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(67 56 202 / var(--tw-bg-opacity)); } -:is(.dark .dark\:hover\:bg-gray-600:hover) { +.dark\:hover\:bg-gray-600:hover:is(.dark *) { --tw-bg-opacity: 1; background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } -:is(.dark .dark\:hover\:text-white:hover) { +.dark\:hover\:text-white:hover:is(.dark *) { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); } -:is(.dark .dark\:focus\:border-blue-500:focus) { +.dark\:focus\:border-blue-500:focus:is(.dark *) { --tw-border-opacity: 1; border-color: rgb(99 102 241 / var(--tw-border-opacity)); } -:is(.dark .dark\:focus\:ring-blue-500:focus) { +.dark\:focus\:ring-blue-500:focus:is(.dark *) { --tw-ring-opacity: 1; --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); } From e148f70b0c1228988bcb7f04bbbdfd9dd3b3b1ba Mon Sep 17 00:00:00 2001 From: Santiago <71732018+Zasa-san@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:33:00 -0300 Subject: [PATCH 02/15] Resolutions & audit fix (#7267) * remove some resolutions * remove obsolete * fix path-to-regexp * body-parser update * body-parser resolution * return path-to-regexp to express version * add global.css to the gitignore list * Revert "add global.css to the gitignore list" This reverts commit 94447d0e97a1ae68f8d6f1b36c2d40e7ff34fcb6. --- package.json | 30 ++++----- yarn.lock | 170 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 125 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 70b497ae6e..613dd07587 100644 --- a/package.json +++ b/package.json @@ -78,19 +78,11 @@ ] }, "resolutions": { - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", - "bl": "^4.0.3", - "trim": "0.0.3", - "normalize-url": "6.0.1", + "trim": "1.0.1", "node-fetch": "2.6.7", - "@types/istanbul-lib-report": "^3.0.0", - "underscore": "^1.13.6", - "socket.io-parser": "4.2.4", - "json-schema": "^0.4.0", - "@types/react": "^18.0.25 || ^18.3.1", - "@types/react-dom": "^18.0.9 || ^18.3.0", - "ws": "8.17.1" + "ws": "8.18.0", + "path-to-regexp": "0.1.11", + "body-parser": "^1.20.3" }, "dependencies": { "@aws-sdk/client-s3": "3.624.0", @@ -133,7 +125,7 @@ "any-date-parser": "^1.5.4", "bcryptjs": "^2.4.3", "big.js": "^6.2.1", - "body-parser": "^1.20.2", + "body-parser": "^1.20.3", "bootstrap": "3.4.1", "child-process-promise": "^2.2.1", "clean-insights-sdk": "^2.6.2", @@ -147,10 +139,10 @@ "date-fns": "^3.6.0", "diacritics": "^1.3.0", "dotenv": "^16.4.5", - "express": "^4.19.2", - "express-http-proxy": "2.1.1", + "express": "^4.21.0", + "express-http-proxy": "^2.1.1", "express-prom-bundle": "^7.0.0", - "express-session": "1.18.0", + "express-session": "^1.18.0", "filesize": "10.1.6", "flag-icon-css": "^4.1.7", "flowbite": "^2.3.0", @@ -290,15 +282,15 @@ "@testing-library/jest-dom": "6.5.0", "@testing-library/react": "^15.0.7", "@testing-library/user-event": "^14.5.2", - "@types/body-parser": "^1.19.2", + "@types/body-parser": "^1.19.5", "@types/cheerio": "^0.22.30", "@types/child-process-promise": "^2.2.1", "@types/cookie": "^0.6.0", "@types/enzyme": "3.10.12", "@types/enzyme-adapter-react-16": "1.0.2", "@types/expect-puppeteer": "4.4.7", - "@types/express": "4.17.21", - "@types/express-session": "1.18.0", + "@types/express": "^4.17.21", + "@types/express-session": "^1.18.0", "@types/google.maps": "^3.48.2", "@types/immutable": "^3.8.7", "@types/jest": "29.5.12", diff --git a/yarn.lock b/yarn.lock index 0c3b9a4f23..7b12ce0673 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4786,7 +4786,7 @@ resolved "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz" integrity sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q== -"@types/body-parser@*", "@types/body-parser@^1.19.2": +"@types/body-parser@*": version "1.19.2" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== @@ -4794,6 +4794,14 @@ "@types/connect" "*" "@types/node" "*" +"@types/body-parser@^1.19.5": + version "1.19.5" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" + integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== + dependencies: + "@types/connect" "*" + "@types/node" "*" + "@types/cacheable-request@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" @@ -5007,14 +5015,14 @@ "@types/qs" "*" "@types/range-parser" "*" -"@types/express-session@1.18.0": +"@types/express-session@^1.18.0": version "1.18.0" resolved "https://registry.yarnpkg.com/@types/express-session/-/express-session-1.18.0.tgz#7c6f25c3604b28d6bc08a2e3929997bbc7672fa2" integrity sha512-27JdDRgor6PoYlURY+Y5kCakqp5ulC0kmf7y+QwaY+hv9jEFuQOThgkjyA53RP3jmKuBsH5GR6qEfFmvb8mwOA== dependencies: "@types/express" "*" -"@types/express@*", "@types/express@4.17.21", "@types/express@^4.17.21", "@types/express@^4.7.0": +"@types/express@*", "@types/express@^4.17.21", "@types/express@^4.7.0": version "4.17.21" resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== @@ -5104,7 +5112,7 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== -"@types/istanbul-lib-report@*", "@types/istanbul-lib-report@^3.0.0": +"@types/istanbul-lib-report@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== @@ -5342,7 +5350,7 @@ dependencies: react-dnd "*" -"@types/react-dom@^18.0.0", "@types/react-dom@^18.0.9", "@types/react-dom@^18.0.9 || ^18.3.0": +"@types/react-dom@^18.0.0", "@types/react-dom@^18.0.9": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg== @@ -5394,7 +5402,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@>=16.9.11", "@types/react@^16", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^18.0.25 || ^18.3.1", "@types/react@^18.3.1": +"@types/react@*", "@types/react@>=16.9.11", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^18.3.1": version "18.3.1" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.1.tgz#fed43985caa834a2084d002e4771e15dfcbdbe8e" integrity sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw== @@ -5402,6 +5410,15 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/react@^16": + version "16.14.61" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.61.tgz#ce498029a046d17908001e6e563f3febbaf41e7f" + integrity sha512-CK3zd17pDWAEMnN5TdzwQJQlto2dK/lb0WZsI74owWgQ8PR60WRk0sCeBxLWuSuuqqDZKqeUcxod/8yECqrP/g== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "^0.16" + csstype "^3.0.2" + "@types/recharts@^1.8.24": version "1.8.29" resolved "https://registry.yarnpkg.com/@types/recharts/-/recharts-1.8.29.tgz#5e117521a65bf015b808350b45b65553ff5011f3" @@ -5443,6 +5460,11 @@ dependencies: "@types/node" "*" +"@types/scheduler@^0.16": + version "0.16.8" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" + integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== + "@types/semver@^7.3.12", "@types/semver@^7.3.4": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" @@ -6633,7 +6655,7 @@ bintrees@1.0.1: resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.1.tgz#0e655c9b9c2435eaab68bf4027226d2b55a34524" integrity sha1-DmVcm5wkNeqraL9AJyJtK1WjRSQ= -bl@^4.0.3, bl@^4.1.0: +bl@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz" integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== @@ -6642,6 +6664,15 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blob-util@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" @@ -6672,25 +6703,7 @@ bn.js@^5.0.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.20.2, body-parser@^1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@1.20.3: +body-parser@1.20.2, body-parser@1.20.3, body-parser@^1.20.3: version "1.20.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== @@ -7426,6 +7439,11 @@ component-bind@1.0.0: resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" integrity sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw== +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA== + component-emitter@^1.3.0, component-emitter@~1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17" @@ -9705,7 +9723,7 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -express-http-proxy@2.1.1: +express-http-proxy@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/express-http-proxy/-/express-http-proxy-2.1.1.tgz#90bd7eaee5166be968157b035eb6b499d2af2bf4" integrity sha512-4aRQRqDQU7qNPV5av0/hLcyc0guB9UP71nCYrQEYml7YphTo8tmWf3nDZWdTJMMjFikyz9xKXaURor7Chygdwg== @@ -9724,7 +9742,7 @@ express-prom-bundle@^7.0.0: on-finished "^2.3.0" url-value-parser "^2.0.0" -express-session@1.18.0: +express-session@^1.18.0: version "1.18.0" resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.18.0.tgz#a6ae39d9091f2efba5f20fc5c65a3ce7c9ce16a3" integrity sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ== @@ -9775,7 +9793,7 @@ express@^4.17.3, express@^4.18.2: utils-merge "1.0.1" vary "~1.1.2" -express@^4.19.2: +express@^4.21.0: version "4.21.0" resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== @@ -12891,7 +12909,7 @@ locate-path@^7.1.0: dependencies: p-locate "^6.0.0" -lodash-es@^4.17.15, lodash-es@^4.17.21, lodash-es@^4.2.0, lodash-es@^4.2.1: +lodash-es@^4.17.15, lodash-es@^4.2.0, lodash-es@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== @@ -13775,7 +13793,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" -normalize-url@6.0.1, normalize-url@^6.0.1: +normalize-url@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.0.1.tgz#a4f27f58cf8c7b287b440b8a8201f42d0b00d256" integrity sha512-VU4pzAuh7Kip71XEmO9aNREYAdMHFGTVj/i+CaTImS8x0i1d3jUZkXhqluy/PRgjPLMgsLQulYY3PJ/aSbSjpQ== @@ -14362,18 +14380,10 @@ path-scurry@^1.10.1, path-scurry@^1.6.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" - integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - -path-to-regexp@^2.2.1: - version "2.4.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz" +path-to-regexp@0.1.10, path-to-regexp@0.1.11, path-to-regexp@0.1.7, path-to-regexp@^2.2.1: + version "0.1.11" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.11.tgz#a527e662c89efc4646dbfa8100bf3e847e495761" + integrity sha512-c0t+KCuUkO/YDLPG4WWzEwx3J5F/GHXsD1h/SNZfySqAIKe/BaP95x8fWtOfRJokpS5yYHRJjMtYlXD8jxnpbw== path-type@^4.0.0: version "4.0.0" @@ -16558,7 +16568,7 @@ socket.io-client@4.7.5: engine.io-client "~6.5.2" socket.io-parser "~4.2.4" -socket.io-parser@4.2.4, socket.io-parser@~3.3.0, socket.io-parser@~3.4.0, socket.io-parser@~4.2.1, socket.io-parser@~4.2.4: +socket.io-parser@4.2.4, socket.io-parser@~4.2.1, socket.io-parser@~4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== @@ -16566,6 +16576,24 @@ socket.io-parser@4.2.4, socket.io-parser@~3.3.0, socket.io-parser@~3.4.0, socket "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" +socket.io-parser@~3.3.0: + version "3.3.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.4.tgz#ab84236b6d06eaf1fb68b179b3a7501195886cc3" + integrity sha512-z/pFQB3x+EZldRRzORYW1vwVO8m/3ILkswtnpoeU6Ve3cbMWkmHEWDAVJn4QJtchiiFTo5j7UG2QvwxvaA9vow== + dependencies: + component-emitter "~1.3.0" + debug "~3.1.0" + isarray "2.0.1" + +socket.io-parser@~3.4.0: + version "3.4.3" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.3.tgz#b19bdaad38ed39fd68fba3f9d86768f667df0c29" + integrity sha512-1rE4dZN3kCI/E5wixd393hmbqa78vVpkKmnEJhLeWoS/C5hbFYAbcSfnWoaVH43u9ToUVtzKjguxEZq+1XZfCQ== + dependencies: + component-emitter "1.2.1" + debug "~4.1.0" + isarray "2.0.1" + socket.io@*, socket.io@4.7.5: version "4.7.5" resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" @@ -16779,7 +16807,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -16882,7 +16919,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17417,10 +17461,10 @@ trigram-utils@^1.0.0: n-gram "^1.0.0" trim "0.0.1" -trim@0.0.1, trim@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.3.tgz#05243a47a3a4113e6b49367880a9cca59697a20b" - integrity sha512-h82ywcYhHK7veeelXrCScdH7HkWfbIT1D/CgYO+nmDarz3SGNssVBMws6jU16Ga60AJCRAvPV6w6RLuNerQqjg== +trim@0.0.1, trim@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim/-/trim-1.0.1.tgz#68e78f6178ccab9687a610752f4f5e5a7022ee8c" + integrity sha512-3JVP2YVqITUisXblCDq/Bi4P9457G/sdEamInkyvCsjbTcXLXIiG7XCb4kGMFWh6JGXesS3TKxOPtrncN/xe8w== truncate-utf8-bytes@^1.0.0: version "1.0.2" @@ -17713,11 +17757,16 @@ undefsafe@^2.0.5: resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== -underscore@^1.13.6, underscore@^1.13.7, underscore@~1.4.4: +underscore@^1.13.7: version "1.13.7" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== +underscore@~1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" + integrity sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ== + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -18341,7 +18390,7 @@ world-countries@5.0.0: resolved "https://registry.yarnpkg.com/world-countries/-/world-countries-5.0.0.tgz#6f75ebcce3d5224d84e9117eaf0d75a7726b6501" integrity sha512-wAfOT9Y5i/xnxNOdKJKXdOCw9Q3yQLahBUeuRol+s+o20F6h2a4tLEbJ1lBCYwEQ30Sf9Meqeipk1gib3YwF5w== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -18359,6 +18408,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -18390,10 +18448,10 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@8.17.1, ws@8.5.0, ws@^7.3.1, ws@^8.2.3, ws@^8.8.0, ws@~7.4.2, ws@~8.11.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== +ws@8.18.0, ws@8.5.0, ws@^7.3.1, ws@^8.2.3, ws@^8.8.0, ws@~7.4.2, ws@~8.11.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== xhr@^2.0.1: version "2.6.0" From 8dd94d104b4dded38bdd5d6fae7229688e1b6eca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:52:47 -0300 Subject: [PATCH 03/15] Bump webpack-dev-middleware from 7.3.0 to 7.4.2 (#7257) Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 7.3.0 to 7.4.2. - [Release notes](https://github.com/webpack/webpack-dev-middleware/releases) - [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v7.3.0...v7.4.2) --- updated-dependencies: - dependency-name: webpack-dev-middleware 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> Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> From ecaf2cb061fba93ab627fd75c7380f38b87615eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:11:00 -0300 Subject: [PATCH 04/15] Bump cypress from 13.13.2 to 13.14.2 (#7256) Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.2 to 13.14.2. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v13.13.2...v13.14.2) --- updated-dependencies: - dependency-name: cypress 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> Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 613dd07587..94332a2f28 100644 --- a/package.json +++ b/package.json @@ -336,7 +336,7 @@ "copy-webpack-plugin": "12.0.2", "css-loader": "^7.1.2", "css-minimizer-webpack-plugin": "^7.0.0", - "cypress": "13.14.1", + "cypress": "13.14.2", "cypress-axe": "^1.5.0", "cypress-plugin-snapshots": "^1.4.4", "cypress-real-events": "^1.13.0", diff --git a/yarn.lock b/yarn.lock index 7b12ce0673..7d8bba74a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7994,10 +7994,10 @@ cypress-real-events@^1.13.0: resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.13.0.tgz#6b7cd32dcac172db1493608f97a2576c7d0bd5af" integrity sha512-LoejtK+dyZ1jaT8wGT5oASTPfsNV8/ClRp99ruN60oPj8cBJYod80iJDyNwfPAu4GCxTXOhhAv9FO65Hpwt6Hg== -cypress@13.14.1: - version "13.14.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.14.1.tgz#05875bbbf6333e858a92aed33ba67d7ddf8370d7" - integrity sha512-Wo+byPmjps66hACEH5udhXINEiN3qS3jWNGRzJOjrRJF3D0+YrcP2LVB1T7oYaVQM/S+eanqEvBWYc8cf7Vcbg== +cypress@13.14.2: + version "13.14.2" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.14.2.tgz#4237eb7b26de2baeaa1f01e585f965d88fca7f39" + integrity sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA== dependencies: "@cypress/request" "^3.0.1" "@cypress/xvfb" "^1.2.4" From 01dfe0b559b51da583bd9dae417bd62b14f16044 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:34:14 -0300 Subject: [PATCH 05/15] Bump @chromatic-com/storybook from 1.6.1 to 2.0.2 (#7254) Bumps [@chromatic-com/storybook](https://github.com/chromaui/addon-visual-tests) from 1.6.1 to 2.0.2. - [Release notes](https://github.com/chromaui/addon-visual-tests/releases) - [Changelog](https://github.com/chromaui/addon-visual-tests/blob/main/CHANGELOG.md) - [Commits](https://github.com/chromaui/addon-visual-tests/compare/v1.6.1...v2.0.2) --- updated-dependencies: - dependency-name: "@chromatic-com/storybook" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mercy Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 94332a2f28..e14b3ca1be 100644 --- a/package.json +++ b/package.json @@ -268,7 +268,7 @@ "@babel/register": "^7.24.6", "@babel/traverse": "^7.25.4", "@cfaester/enzyme-adapter-react-18": "^0.8.0", - "@chromatic-com/storybook": "^1.6.1", + "@chromatic-com/storybook": "^2.0.2", "@cypress/react18": "^2.0.1", "@storybook/addon-actions": "^8.1.11", "@storybook/addon-essentials": "^8.1.11", diff --git a/yarn.lock b/yarn.lock index 7d8bba74a5..5021987650 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1811,10 +1811,10 @@ react-is "^18.2.0" react-shallow-renderer "^16.15.0" -"@chromatic-com/storybook@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@chromatic-com/storybook/-/storybook-1.6.1.tgz#42173679c166ce982903b9e40bb457c037e9dac2" - integrity sha512-x1x1NB3j4xpfeSWKr96emc+7ZvfsvH+/WVb3XCjkB24PPbT8VZXb3mJSAQMrSzuQ8+eQE9kDogYHH9Fj3tb/Cw== +"@chromatic-com/storybook@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@chromatic-com/storybook/-/storybook-2.0.2.tgz#3e20de5a328165b66c4587dbed0843c6039400ce" + integrity sha512-7bPIliISedeIpnVKbzktysFYW5n56bN91kxuOj1XXKixmjbUHRUMvcXd4K2liN6MiR5ZqJtmtcPsZ6CebbGlEA== dependencies: chromatic "^11.4.0" filesize "^10.0.12" From 5baa900f5902b7daee806918572416cddcd25eb4 Mon Sep 17 00:00:00 2001 From: gabriel-piles Date: Thu, 26 Sep 2024 08:27:13 +0200 Subject: [PATCH 06/15] Send extra metadata to the Metadata Extractor service (#7088) * Send extra metadata to the Metadata Extractor service --- .../InformationExtraction.ts | 15 +++++++- .../specs/InformationExtraction.spec.ts | 34 +++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/app/api/services/informationextraction/InformationExtraction.ts b/app/api/services/informationextraction/InformationExtraction.ts index 97d2d654b2..a15993f494 100644 --- a/app/api/services/informationextraction/InformationExtraction.ts +++ b/app/api/services/informationextraction/InformationExtraction.ts @@ -55,6 +55,7 @@ interface TaskParameters { id: string; multi_value?: boolean; options?: { label: string; id: string }[]; + metadata?: { [key: string]: string }; } type ResultParameters = TaskParameters; @@ -354,7 +355,14 @@ class InformationExtraction { await this.taskManager.startTask({ task: 'suggestions', tenant: tenants.current().name, - params: { id: extractorId.toString() }, + params: { + id: extractorId.toString(), + metadata: { + extractor_name: extractor.name || '', + property: extractor.property || '', + templates: Array.isArray(extractor.templates) ? extractor.templates.join(',') : '', + }, + }, }); }; @@ -395,6 +403,11 @@ class InformationExtraction { const params: TaskParameters = { id: extractorId.toString(), multi_value: property.type === 'multiselect' || property.type === 'relationship', + metadata: { + extractor_name: extractor.name || '', + property: extractor.property || '', + templates: extractor.templates ? extractor.templates.join(',') : '', + }, }; if (propertyTypeIsSelectOrMultiSelect(property.type)) { diff --git a/app/api/services/informationextraction/specs/InformationExtraction.spec.ts b/app/api/services/informationextraction/specs/InformationExtraction.spec.ts index 233dd246bd..34230e8764 100644 --- a/app/api/services/informationextraction/specs/InformationExtraction.spec.ts +++ b/app/api/services/informationextraction/specs/InformationExtraction.spec.ts @@ -334,7 +334,15 @@ describe('InformationExtraction', () => { await informationExtraction.trainModel(factory.id('prop1extractor')); expect(informationExtraction.taskManager?.startTask).toHaveBeenCalledWith({ - params: { id: factory.id('prop1extractor').toString(), multi_value: false }, + params: { + id: factory.id('prop1extractor').toString(), + multi_value: false, + metadata: { + extractor_name: 'prop1extractor', + property: 'property1', + templates: expect.anything(), + }, + }, tenant: 'tenant1', task: 'create_model', }); @@ -369,6 +377,11 @@ describe('InformationExtraction', () => { label: '1B', }, ], + metadata: { + extractor_name: 'extractorWithMultiselect', + property: 'property_multiselect', + templates: expect.anything(), + }, }, tenant: 'tenant1', task: 'create_model', @@ -396,6 +409,11 @@ describe('InformationExtraction', () => { label: 'P3', }, ], + metadata: { + extractor_name: 'extractorWithRelationship', + property: 'property_relationship', + templates: expect.anything(), + }, }, tenant: 'tenant1', task: 'create_model', @@ -427,6 +445,11 @@ describe('InformationExtraction', () => { label: `A${i + 1}`, })), ], + metadata: { + extractor_name: 'extractorWithRelationshipToAny', + property: 'property_relationship_to_any', + templates: expect.anything(), + }, }, tenant: 'tenant1', task: 'create_model', @@ -711,7 +734,14 @@ describe('InformationExtraction', () => { await informationExtraction.getSuggestions(factory.id('prop1extractor')); expect(informationExtraction.taskManager?.startTask).toHaveBeenCalledWith({ - params: { id: factory.id('prop1extractor').toString() }, + params: { + id: factory.id('prop1extractor').toString(), + metadata: { + extractor_name: 'prop1extractor', + property: 'property1', + templates: expect.anything(), + }, + }, tenant: 'tenant1', task: 'suggestions', }); From ecd15fcc5ea287124e66cc07f0d37f44b7a81b2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:00:52 -0300 Subject: [PATCH 07/15] Bump cypress from 13.14.2 to 13.15.0 (#7271) Bumps [cypress](https://github.com/cypress-io/cypress) from 13.14.2 to 13.15.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v13.14.2...v13.15.0) --- updated-dependencies: - dependency-name: cypress 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> Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 62 +++++++++++++++++++--------------------------------- 2 files changed, 24 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index b2ab897d3c..950b212987 100644 --- a/package.json +++ b/package.json @@ -336,7 +336,7 @@ "copy-webpack-plugin": "12.0.2", "css-loader": "^7.1.2", "css-minimizer-webpack-plugin": "^7.0.0", - "cypress": "13.14.2", + "cypress": "13.15.0", "cypress-axe": "^1.5.0", "cypress-plugin-snapshots": "^1.4.4", "cypress-real-events": "^1.13.0", diff --git a/yarn.lock b/yarn.lock index 5021987650..0492cf9885 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1839,10 +1839,10 @@ resolved "https://registry.yarnpkg.com/@cypress/react18/-/react18-2.0.1.tgz#7bc6d9b557fd6a516a690996946092b12abbd3f9" integrity sha512-T/bhFEvVDIu0lDOKXbEQqVEmmANKWc/pyFDyDoJw3OndRYv9QVEJSsE/VNXIaOQLDjWvQkKBOwd0lLe1hWF/Zg== -"@cypress/request@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" - integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== +"@cypress/request@^3.0.4": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.5.tgz#d893a6e68ce2636c085fcd8d7283c3186499ba63" + integrity sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -1850,14 +1850,14 @@ combined-stream "~1.0.6" extend "~3.0.2" forever-agent "~0.6.1" - form-data "~2.3.2" - http-signature "~1.3.6" + form-data "~4.0.0" + http-signature "~1.4.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "6.10.4" + qs "6.13.0" safe-buffer "^5.1.2" tough-cookie "^4.1.3" tunnel-agent "^0.6.0" @@ -7378,7 +7378,7 @@ colors@0.5.x: version "0.5.1" resolved "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz" -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -7994,12 +7994,12 @@ cypress-real-events@^1.13.0: resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.13.0.tgz#6b7cd32dcac172db1493608f97a2576c7d0bd5af" integrity sha512-LoejtK+dyZ1jaT8wGT5oASTPfsNV8/ClRp99ruN60oPj8cBJYod80iJDyNwfPAu4GCxTXOhhAv9FO65Hpwt6Hg== -cypress@13.14.2: - version "13.14.2" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.14.2.tgz#4237eb7b26de2baeaa1f01e585f965d88fca7f39" - integrity sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA== +cypress@13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.15.0.tgz#5eca5387ef34b2e611cfa291967c69c2cd39381d" + integrity sha512-53aO7PwOfi604qzOkCSzNlWquCynLlKE/rmmpSPcziRH6LNfaDUAklQT6WJIsD8ywxlIy+uVZsnTMCCQVd2kTw== dependencies: - "@cypress/request" "^3.0.1" + "@cypress/request" "^3.0.4" "@cypress/xvfb" "^1.2.4" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" @@ -10309,7 +10309,7 @@ fork-ts-checker-webpack-plugin@^8.0.0: semver "^7.3.5" tapable "^2.2.1" -form-data@^4.0.0: +form-data@^4.0.0, form-data@~4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== @@ -10318,15 +10318,6 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - formatcoords@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/formatcoords/-/formatcoords-1.1.3.tgz" @@ -11142,14 +11133,14 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-signature@~1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" - integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== +http-signature@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.4.0.tgz#dee5a9ba2bf49416abc544abd6d967f6a94c8c3f" + integrity sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg== dependencies: assert-plus "^1.0.0" jsprim "^2.0.2" - sshpk "^1.14.1" + sshpk "^1.18.0" http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" @@ -15109,13 +15100,6 @@ qrcode.react@^4.0.1: resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-4.0.1.tgz#1caf1d3f45bf1b6d9cf800cb0f0d671f6a89e68f" integrity sha512-Lpj0tPBn561WiQ3QQWXbkx8xTtB8BZkJeMZWLJIL8iaPBCoWzW1IpCeU3gY5MDqsb0+efCvEGkl9O0naP64crA== -qs@6.10.4: - version "6.10.4" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" - integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== - dependencies: - side-channel "^1.0.4" - qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -16700,10 +16684,10 @@ spy-on-component@^1.1.0: resolved "https://registry.npmjs.org/spy-on-component/-/spy-on-component-1.1.3.tgz" integrity sha512-a7jgnoBSdkcDWIQQwtEgUq4etajwG6+wGIjfC9ARUKwKOdHxJd+utgHTgLn81ETizpsw4xddUS3W8VePedtaIQ== -sshpk@^1.14.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== +sshpk@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" From 0116bcad547cd0f04cf51a1859b257782390b7c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:32:40 -0300 Subject: [PATCH 08/15] Bump sass from 1.78.0 to 1.79.3 (#7273) Bumps [sass](https://github.com/sass/dart-sass) from 1.78.0 to 1.79.3. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.78.0...1.79.3) --- updated-dependencies: - dependency-name: sass 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> Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 950b212987..3fca7b341b 100644 --- a/package.json +++ b/package.json @@ -375,7 +375,7 @@ "react-dnd-test-backend": "15.1.1", "redux-mock-store": "^1.5.4", "rtlcss-webpack-plugin": "4.0.7", - "sass": "1.78.0", + "sass": "1.79.3", "sass-loader": "16.0.1", "storybook": "^8.1.11", "stream-mock": "^2.0.5", diff --git a/yarn.lock b/yarn.lock index 0492cf9885..e1a54de3ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7129,7 +7129,7 @@ child-process-promise@^2.2.1: node-version "^1.0.0" promise-polyfill "^6.0.1" -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.2, chokidar@^3.5.3, chokidar@^3.6.0: +chokidar@^3.5.2, chokidar@^3.5.3, chokidar@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -7144,6 +7144,13 @@ child-process-promise@^2.2.1: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.1.tgz#4a6dff66798fb0f72a94f616abbd7e1a19f31d41" + integrity sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA== + dependencies: + readdirp "^4.0.1" + chownr@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz" @@ -15653,6 +15660,11 @@ readable-stream@^4.5.2: process "^0.11.10" string_decoder "^1.3.0" +readdirp@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.1.tgz#b2fe35f8dca63183cd3b86883ecc8f720ea96ae6" + integrity sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -16182,12 +16194,12 @@ sass-loader@16.0.1: dependencies: neo-async "^2.6.2" -sass@1.78.0: - version "1.78.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.78.0.tgz#cef369b2f9dc21ea1d2cf22c979f52365da60841" - integrity sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ== +sass@1.79.3: + version "1.79.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.79.3.tgz#7811b000eb68195fe51dea89177e73e7ef7f546f" + integrity sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA== dependencies: - chokidar ">=3.0.0 <4.0.0" + chokidar "^4.0.0" immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" From 47ef167bec4080f9665effb2b800e10d535366bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:54:56 -0300 Subject: [PATCH 09/15] Bump sass-loader from 16.0.1 to 16.0.2 (#7272) Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 16.0.1 to 16.0.2. - [Release notes](https://github.com/webpack-contrib/sass-loader/releases) - [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/sass-loader/compare/v16.0.1...v16.0.2) --- updated-dependencies: - dependency-name: sass-loader 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> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3fca7b341b..08e67c3895 100644 --- a/package.json +++ b/package.json @@ -376,7 +376,7 @@ "redux-mock-store": "^1.5.4", "rtlcss-webpack-plugin": "4.0.7", "sass": "1.79.3", - "sass-loader": "16.0.1", + "sass-loader": "16.0.2", "storybook": "^8.1.11", "stream-mock": "^2.0.5", "supertest": "7.0.0", diff --git a/yarn.lock b/yarn.lock index e1a54de3ac..58b1e4e35e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16187,10 +16187,10 @@ sanitize-html@^2.13.0: parse-srcset "^1.0.2" postcss "^8.3.11" -sass-loader@16.0.1: - version "16.0.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.1.tgz#57049c1787076e923b21a1dccc612546ecaf4295" - integrity sha512-xACl1ToTsKnL9Ce5yYpRxrLj9QUDCnwZNhzpC7tKiFyA8zXsd3Ap+HGVnbCgkdQcm43E+i6oKAWBsvGA6ZoiMw== +sass-loader@16.0.2: + version "16.0.2" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.2.tgz#e581bc13d7cb5090e27f155c6aa2855c08cafe86" + integrity sha512-Ll6iXZ1EYwYT19SqW4mSBb76vSSi8JgzElmzIerhEGgzB5hRjDQIWsPmuk1UrAXkR16KJHqVY0eH+5/uw9Tmfw== dependencies: neo-async "^2.6.2" From 398f9df0b2916ac31261bfcd79979b1e59d5ca1f Mon Sep 17 00:00:00 2001 From: Joan Gallego Girona Date: Mon, 30 Sep 2024 17:04:17 +0200 Subject: [PATCH 10/15] WIP, changes to actually make it work on the dummy service (#7283) * WIP, changes to actually make it work on the dummy service * Added option to deactivate the service * Removed unused includes * Included ATConfig injection * Fixed typing errors * Removed access to async context before tenant * Delete ATSemanticConfig.json * Upped version. * Added environmnent to test. --------- Co-authored-by: RafaPolit --- app/api/eventListeners.ts | 2 + .../AutomaticTranslationFactory.ts | 6 ++ .../RequestEntityTranslation.ts | 32 ++++------ .../driving/ATEntityCreationListener.ts | 27 ++++++--- .../adapters/driving/ATServiceListener.ts | 4 +- .../specs/ATEntityCreatedListener.spec.ts | 59 ++++++++++++++++--- .../driving/specs/ATServiceListener.spec.ts | 8 +-- .../specs/RequestEntityTranslation.spec.ts | 20 +++---- app/api/utils/handleError.js | 1 + app/worker.ts | 2 + package.json | 2 +- 11 files changed, 108 insertions(+), 55 deletions(-) diff --git a/app/api/eventListeners.ts b/app/api/eventListeners.ts index 2daaddc844..ced38d48fe 100644 --- a/app/api/eventListeners.ts +++ b/app/api/eventListeners.ts @@ -1,10 +1,12 @@ import { EventsBus } from './eventsbus'; +import { AutomaticTranslationFactory } from './externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { registerEventListeners as registerSegmentationListeners } from './services/pdfsegmentation/eventListeners'; import { Suggestions } from './suggestions/suggestions'; const registerEventListeners = (eventsBus: EventsBus) => { Suggestions.registerEventListeners(eventsBus); registerSegmentationListeners(eventsBus); + AutomaticTranslationFactory.defaultATEntityCreationListener(eventsBus).start(); }; export { registerEventListeners }; diff --git a/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts b/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts index 7315d3bdc6..d56d6ba1bd 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts @@ -1,10 +1,12 @@ import { DefaultTransactionManager } from 'api/common.v2/database/data_source_defaults'; import { getConnection } from 'api/common.v2/database/getConnectionForCurrentTenant'; import { DefaultEntitiesDataSource } from 'api/entities.v2/database/data_source_defaults'; +import { EventsBus } from 'api/eventsbus'; import { TaskManager } from 'api/services/tasksmanager/TaskManager'; import { DefaultSettingsDataSource } from 'api/settings.v2/database/data_source_defaults'; import { DefaultTemplatesDataSource } from 'api/templates.v2/database/data_source_defaults'; import { MongoTemplatesDataSource } from 'api/templates.v2/database/MongoTemplatesDataSource'; +import { ATEntityCreationListener } from './adapters/driving/ATEntityCreationListener'; import { GenerateAutomaticTranslationsCofig } from './GenerateAutomaticTranslationConfig'; import { AJVATConfigValidator } from './infrastructure/AJVATConfigValidator'; import { AJVTranslationResultValidator } from './infrastructure/AJVTranslationResultValidator'; @@ -53,6 +55,10 @@ const AutomaticTranslationFactory = { new AJVEntityInputValidator() ); }, + + defaultATEntityCreationListener(eventsBus: EventsBus) { + return new ATEntityCreationListener(eventsBus); + }, }; export { AutomaticTranslationFactory }; diff --git a/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts b/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts index f0d25f9aef..af9464cf91 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts @@ -7,16 +7,14 @@ import { ATConfigService } from './services/GetAutomaticTranslationConfig'; import { InvalidInputDataFormat } from './errors/generateATErrors'; export type ATTaskMessage = { - params: { - key: string[]; - text: string; - language_from: string; - languages_to: string[]; - }; + key: string[]; + text: string; + language_from: string; + languages_to: string[]; }; export class RequestEntityTranslation { - static SERVICE_NAME = 'AutomaticTranslation'; + static SERVICE_NAME = 'translations'; private taskManager: TaskManager; @@ -74,12 +72,10 @@ export class RequestEntityTranslation { } await this.taskManager.startTask({ - params: { - key: [getTenant().name, entity.sharedId, commonPropName], - text: entity[commonPropName], - language_from: languageFrom, - languages_to: languagesTo, - }, + key: [getTenant().name, entity.sharedId, commonPropId.toString()], + text: entity[commonPropName], + language_from: languageFrom, + languages_to: languagesTo, }); }); atTemplateConfig?.properties.forEach(async propId => { @@ -94,12 +90,10 @@ export class RequestEntityTranslation { if (entity.metadata[propName]?.[0].value) { await this.taskManager.startTask({ - params: { - key: [getTenant().name, entity.sharedId, propName], - text: entity.metadata[propName][0].value, - language_from: languageFrom, - languages_to: languagesTo, - }, + key: [getTenant().name, entity.sharedId, propId], + text: entity.metadata[propName][0].value, + language_from: languageFrom, + languages_to: languagesTo, }); } }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts index 502d95e0c7..1932a82376 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts @@ -1,25 +1,34 @@ import { EntityCreatedEvent } from 'api/entities/events/EntityCreatedEvent'; import { EventsBus } from 'api/eventsbus'; -import { RequestEntityTranslation } from '../../RequestEntityTranslation'; +import { permissionsContext } from 'api/permissions/permissionsContext'; +import { AutomaticTranslationFactory } from '../../AutomaticTranslationFactory'; export class ATEntityCreationListener { - private requestEntityTranslation: RequestEntityTranslation; - private eventBus: EventsBus; - constructor(requestEntityTranslation: RequestEntityTranslation, eventBus: EventsBus) { - this.requestEntityTranslation = requestEntityTranslation; + private ATFactory: typeof AutomaticTranslationFactory; + + constructor( + eventBus: EventsBus, + ATFactory: typeof AutomaticTranslationFactory = AutomaticTranslationFactory + ) { this.eventBus = eventBus; + this.ATFactory = ATFactory; } start() { this.eventBus.on(EntityCreatedEvent, async event => { - const entityFrom = event.entities.find(e => e.language === event.targetLanguageKey) || {}; + const { active } = await this.ATFactory.defaultATConfigService().get(); + + if (active) { + permissionsContext.setCommandContext(); + const entityFrom = event.entities.find(e => e.language === event.targetLanguageKey) || {}; - entityFrom._id = entityFrom._id?.toString(); - entityFrom.template = entityFrom.template?.toString(); + entityFrom._id = entityFrom._id?.toString(); + entityFrom.template = entityFrom.template?.toString(); - await this.requestEntityTranslation.execute(entityFrom); + await this.ATFactory.defaultRequestEntityTranslation().execute(entityFrom); + } }); } } diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts index 744a98cee8..a1148c3e5c 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts @@ -1,12 +1,13 @@ import { tenants } from 'api/tenants'; import { TaskManager } from 'api/services/tasksmanager/TaskManager'; +import { permissionsContext } from 'api/permissions/permissionsContext'; import { ATTranslationResultValidator } from '../../contracts/ATTranslationResultValidator'; import { AJVTranslationResultValidator } from '../../infrastructure/AJVTranslationResultValidator'; import { InvalidATServerResponse } from '../../errors/generateATErrors'; import { AutomaticTranslationFactory } from '../../AutomaticTranslationFactory'; export class ATServiceListener { - static SERVICE_NAME = 'AutomaticTranslation'; + static SERVICE_NAME = 'translations'; private taskManager: TaskManager; @@ -20,6 +21,7 @@ export class ATServiceListener { } await tenants.run(async () => { + permissionsContext.setCommandContext(); await ATFactory.defaultSaveEntityTranslations().execute(result); }, result.key[0]); }, diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts index 6113681746..35e04ce5d6 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts @@ -4,25 +4,52 @@ import { RequestEntityTranslation } from 'api/externalIntegrations.v2/automaticT import { testingEnvironment } from 'api/utils/testingEnvironment'; import { AutomaticTranslationFactory } from 'api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { getFixturesFactory } from 'api/utils/fixturesFactory'; +import { tenants } from 'api/tenants'; +import { DefaultTransactionManager } from 'api/common.v2/database/data_source_defaults'; +import { ATConfigService } from 'api/externalIntegrations.v2/automaticTranslation/services/GetAutomaticTranslationConfig'; +import { DefaultSettingsDataSource } from 'api/settings.v2/database/data_source_defaults'; +import { MongoATConfigDataSource } from 'api/externalIntegrations.v2/automaticTranslation/infrastructure/MongoATConfigDataSource'; +import { getConnection } from 'api/common.v2/database/getConnectionForCurrentTenant'; +import { DefaultTemplatesDataSource } from 'api/templates.v2/database/data_source_defaults'; +import { ATExternalAPI } from 'api/externalIntegrations.v2/automaticTranslation/infrastructure/ATExternalAPI'; import { ATEntityCreationListener } from '../ATEntityCreationListener'; const factory = getFixturesFactory(); +const prepareATFactory = (executeSpy: jest.Mock) => { + // @ts-ignore + const ATFactory: typeof AutomaticTranslationFactory = { + defaultATConfigService() { + const transactionManager = DefaultTransactionManager(); + return new ATConfigService( + DefaultSettingsDataSource(transactionManager), + new MongoATConfigDataSource(getConnection(), transactionManager), + DefaultTemplatesDataSource(transactionManager), + new ATExternalAPI() + ); + }, + defaultRequestEntityTranslation() { + return { execute: executeSpy } as unknown as RequestEntityTranslation; + }, + }; + + return ATFactory; +}; + describe('ATEntityCreationListener', () => { let listener: ATEntityCreationListener; const eventBus: EventsBus = new EventsBus(); - let requestEntityTranslation: RequestEntityTranslation; + let executeSpy: jest.Mock; beforeEach(async () => { await testingEnvironment.setUp({ - settings: [{ features: { automaticTranslation: { active: true } } }], + settings: [{ features: { automaticTranslation: { active: false } } }], }); await testingEnvironment.setTenant('tenant'); - requestEntityTranslation = AutomaticTranslationFactory.defaultRequestEntityTranslation(); - jest.spyOn(requestEntityTranslation, 'execute'); + executeSpy = jest.fn(); - listener = new ATEntityCreationListener(requestEntityTranslation, eventBus); + listener = new ATEntityCreationListener(eventBus, prepareATFactory(executeSpy)); listener.start(); }); @@ -31,16 +58,34 @@ describe('ATEntityCreationListener', () => { }); describe('Request entity translation', () => { + it('should not request translations if feature flag is off', async () => { + const entityCreationEvent = new EntityCreatedEvent({ + entities: [{ sharedId: 'entity 1' }], + targetLanguageKey: 'en', + }); + + await tenants.run(async () => { + await eventBus.emit(entityCreationEvent); + }, 'tenant'); + + expect(executeSpy).not.toHaveBeenCalled(); + }); + it('should call RequestEntityTranslation on receiving entity creation event', async () => { + await testingEnvironment.setFixtures({ + settings: [{ features: { automaticTranslation: { active: true } } }], + }); const entityEn = factory.entity('entity1', 'template1', {}, { language: 'en' }); const entityCreationEvent = new EntityCreatedEvent({ entities: [factory.entity('entity1', 'template1', {}, { language: 'es' }), entityEn], targetLanguageKey: 'en', }); - await eventBus.emit(entityCreationEvent); + await tenants.run(async () => { + await eventBus.emit(entityCreationEvent); + }, 'tenant'); - expect(requestEntityTranslation.execute).toHaveBeenCalledWith(entityEn); + expect(executeSpy).toHaveBeenCalledWith(entityEn); }); }); }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts index 1a18cb2d68..d596a9ad91 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts @@ -5,16 +5,12 @@ import RedisSMQ from 'rsmq'; import waitForExpect from 'wait-for-expect'; import { AutomaticTranslationFactory } from 'api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { testingEnvironment } from 'api/utils/testingEnvironment'; -import { GenerateAutomaticTranslationsCofig } from 'api/externalIntegrations.v2/automaticTranslation/GenerateAutomaticTranslationConfig'; import { SaveEntityTranslations } from 'api/externalIntegrations.v2/automaticTranslation/SaveEntityTranslations'; import { ATServiceListener } from '../ATServiceListener'; const prepareATFactory = (executeSpy: jest.Mock) => { // @ts-ignore const ATFactory: typeof AutomaticTranslationFactory = { - defaultGenerateATConfig() { - return {} as GenerateAutomaticTranslationsCofig; - }, defaultSaveEntityTranslations() { return { execute: executeSpy } as unknown as SaveEntityTranslations; }, @@ -57,7 +53,7 @@ describe('ATServiceListener', () => { await redisSMQ.createQueueAsync({ qname: queueName }); }; - await recreateQueue('AutomaticTranslation_results').catch(error => { + await recreateQueue(`${ATServiceListener.SERVICE_NAME}_results`).catch(error => { throw error; }); @@ -85,7 +81,7 @@ describe('ATServiceListener', () => { executeSpy.mockClear(); await redisSMQ.sendMessageAsync({ - qname: 'AutomaticTranslation_results', + qname: `${config.ENVIRONMENT}_${ATServiceListener.SERVICE_NAME}_results`, message: JSON.stringify(message), }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts index 2b762cb80d..7a1ef6f342 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts @@ -87,21 +87,17 @@ describe('RequestEntityTranslation', () => { expect(taskManager.startTask).toHaveBeenCalledTimes(2); expect(taskManager.startTask).toHaveBeenCalledWith({ - params: { - key: ['tenant', 'entity1', 'title'], - text: 'entity1', - language_from: 'en', - languages_to: ['es'], - }, + key: ['tenant', 'entity1', factory.commonPropertiesTitleId('template1').toString()], + text: 'entity1', + language_from: 'en', + languages_to: ['es'], }); expect(taskManager.startTask).toHaveBeenCalledWith({ - params: { - key: ['tenant', 'entity1', 'text1'], - text: 'original text1', - language_from: 'en', - languages_to: ['es'], - }, + key: ['tenant', 'entity1', factory.property('text1')._id?.toString()], + text: 'original text1', + language_from: 'en', + languages_to: ['es'], }); }); diff --git a/app/api/utils/handleError.js b/app/api/utils/handleError.js index 044121352a..875c700c19 100644 --- a/app/api/utils/handleError.js +++ b/app/api/utils/handleError.js @@ -69,6 +69,7 @@ const prettifyError = (error, { req = {}, uncaught = false } = {}) => { } if (error instanceof Ajv.ValidationError) { + console.log(util.inspect(error)); result = { code: 422, message: error.message, validations: error.errors, logLevel: 'debug' }; } diff --git a/app/worker.ts b/app/worker.ts index d0cc7aeb02..c21548f498 100644 --- a/app/worker.ts +++ b/app/worker.ts @@ -13,6 +13,7 @@ import { InformationExtraction } from 'api/services/informationextraction/Inform import { setupWorkerSockets } from 'api/socketio/setupSockets'; import { ConvertToPdfWorker } from 'api/services/convertToPDF/ConvertToPdfWorker'; import { handleError } from './api/utils/handleError.js'; +import { ATServiceListener } from 'api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener'; let dbAuth = {}; @@ -42,6 +43,7 @@ DB.connect(config.DBHOST, dbAuth) console.info('==> 📡 starting external services...'); ocrManager.start(); + new ATServiceListener().start(); new InformationExtraction().start(); new ConvertToPdfWorker().start(); diff --git a/package.json b/package.json index 7b437dcf55..6d0de2e078 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.187.0-rc1", + "version": "1.187.0-rc2", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react" From b08dfe0b0e2d00f0ad07bd07f52a71f0f3f311e3 Mon Sep 17 00:00:00 2001 From: Joan Gallego Girona Date: Mon, 30 Sep 2024 17:04:17 +0200 Subject: [PATCH 11/15] WIP, changes to actually make it work on the dummy service (#7283) * WIP, changes to actually make it work on the dummy service * Added option to deactivate the service * Removed unused includes * Included ATConfig injection * Fixed typing errors * Removed access to async context before tenant * Delete ATSemanticConfig.json * Upped version. * Added environmnent to test. --------- Co-authored-by: RafaPolit --- app/api/eventListeners.ts | 2 + .../AutomaticTranslationFactory.ts | 6 ++ .../RequestEntityTranslation.ts | 32 ++++------ .../driving/ATEntityCreationListener.ts | 27 ++++++--- .../adapters/driving/ATServiceListener.ts | 4 +- .../specs/ATEntityCreatedListener.spec.ts | 59 ++++++++++++++++--- .../driving/specs/ATServiceListener.spec.ts | 8 +-- .../specs/RequestEntityTranslation.spec.ts | 20 +++---- app/api/utils/handleError.js | 1 + app/worker.ts | 2 + package.json | 2 +- 11 files changed, 108 insertions(+), 55 deletions(-) diff --git a/app/api/eventListeners.ts b/app/api/eventListeners.ts index 2daaddc844..ced38d48fe 100644 --- a/app/api/eventListeners.ts +++ b/app/api/eventListeners.ts @@ -1,10 +1,12 @@ import { EventsBus } from './eventsbus'; +import { AutomaticTranslationFactory } from './externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { registerEventListeners as registerSegmentationListeners } from './services/pdfsegmentation/eventListeners'; import { Suggestions } from './suggestions/suggestions'; const registerEventListeners = (eventsBus: EventsBus) => { Suggestions.registerEventListeners(eventsBus); registerSegmentationListeners(eventsBus); + AutomaticTranslationFactory.defaultATEntityCreationListener(eventsBus).start(); }; export { registerEventListeners }; diff --git a/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts b/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts index 7315d3bdc6..d56d6ba1bd 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory.ts @@ -1,10 +1,12 @@ import { DefaultTransactionManager } from 'api/common.v2/database/data_source_defaults'; import { getConnection } from 'api/common.v2/database/getConnectionForCurrentTenant'; import { DefaultEntitiesDataSource } from 'api/entities.v2/database/data_source_defaults'; +import { EventsBus } from 'api/eventsbus'; import { TaskManager } from 'api/services/tasksmanager/TaskManager'; import { DefaultSettingsDataSource } from 'api/settings.v2/database/data_source_defaults'; import { DefaultTemplatesDataSource } from 'api/templates.v2/database/data_source_defaults'; import { MongoTemplatesDataSource } from 'api/templates.v2/database/MongoTemplatesDataSource'; +import { ATEntityCreationListener } from './adapters/driving/ATEntityCreationListener'; import { GenerateAutomaticTranslationsCofig } from './GenerateAutomaticTranslationConfig'; import { AJVATConfigValidator } from './infrastructure/AJVATConfigValidator'; import { AJVTranslationResultValidator } from './infrastructure/AJVTranslationResultValidator'; @@ -53,6 +55,10 @@ const AutomaticTranslationFactory = { new AJVEntityInputValidator() ); }, + + defaultATEntityCreationListener(eventsBus: EventsBus) { + return new ATEntityCreationListener(eventsBus); + }, }; export { AutomaticTranslationFactory }; diff --git a/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts b/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts index f0d25f9aef..af9464cf91 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/RequestEntityTranslation.ts @@ -7,16 +7,14 @@ import { ATConfigService } from './services/GetAutomaticTranslationConfig'; import { InvalidInputDataFormat } from './errors/generateATErrors'; export type ATTaskMessage = { - params: { - key: string[]; - text: string; - language_from: string; - languages_to: string[]; - }; + key: string[]; + text: string; + language_from: string; + languages_to: string[]; }; export class RequestEntityTranslation { - static SERVICE_NAME = 'AutomaticTranslation'; + static SERVICE_NAME = 'translations'; private taskManager: TaskManager; @@ -74,12 +72,10 @@ export class RequestEntityTranslation { } await this.taskManager.startTask({ - params: { - key: [getTenant().name, entity.sharedId, commonPropName], - text: entity[commonPropName], - language_from: languageFrom, - languages_to: languagesTo, - }, + key: [getTenant().name, entity.sharedId, commonPropId.toString()], + text: entity[commonPropName], + language_from: languageFrom, + languages_to: languagesTo, }); }); atTemplateConfig?.properties.forEach(async propId => { @@ -94,12 +90,10 @@ export class RequestEntityTranslation { if (entity.metadata[propName]?.[0].value) { await this.taskManager.startTask({ - params: { - key: [getTenant().name, entity.sharedId, propName], - text: entity.metadata[propName][0].value, - language_from: languageFrom, - languages_to: languagesTo, - }, + key: [getTenant().name, entity.sharedId, propId], + text: entity.metadata[propName][0].value, + language_from: languageFrom, + languages_to: languagesTo, }); } }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts index 502d95e0c7..1932a82376 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATEntityCreationListener.ts @@ -1,25 +1,34 @@ import { EntityCreatedEvent } from 'api/entities/events/EntityCreatedEvent'; import { EventsBus } from 'api/eventsbus'; -import { RequestEntityTranslation } from '../../RequestEntityTranslation'; +import { permissionsContext } from 'api/permissions/permissionsContext'; +import { AutomaticTranslationFactory } from '../../AutomaticTranslationFactory'; export class ATEntityCreationListener { - private requestEntityTranslation: RequestEntityTranslation; - private eventBus: EventsBus; - constructor(requestEntityTranslation: RequestEntityTranslation, eventBus: EventsBus) { - this.requestEntityTranslation = requestEntityTranslation; + private ATFactory: typeof AutomaticTranslationFactory; + + constructor( + eventBus: EventsBus, + ATFactory: typeof AutomaticTranslationFactory = AutomaticTranslationFactory + ) { this.eventBus = eventBus; + this.ATFactory = ATFactory; } start() { this.eventBus.on(EntityCreatedEvent, async event => { - const entityFrom = event.entities.find(e => e.language === event.targetLanguageKey) || {}; + const { active } = await this.ATFactory.defaultATConfigService().get(); + + if (active) { + permissionsContext.setCommandContext(); + const entityFrom = event.entities.find(e => e.language === event.targetLanguageKey) || {}; - entityFrom._id = entityFrom._id?.toString(); - entityFrom.template = entityFrom.template?.toString(); + entityFrom._id = entityFrom._id?.toString(); + entityFrom.template = entityFrom.template?.toString(); - await this.requestEntityTranslation.execute(entityFrom); + await this.ATFactory.defaultRequestEntityTranslation().execute(entityFrom); + } }); } } diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts index 744a98cee8..a1148c3e5c 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener.ts @@ -1,12 +1,13 @@ import { tenants } from 'api/tenants'; import { TaskManager } from 'api/services/tasksmanager/TaskManager'; +import { permissionsContext } from 'api/permissions/permissionsContext'; import { ATTranslationResultValidator } from '../../contracts/ATTranslationResultValidator'; import { AJVTranslationResultValidator } from '../../infrastructure/AJVTranslationResultValidator'; import { InvalidATServerResponse } from '../../errors/generateATErrors'; import { AutomaticTranslationFactory } from '../../AutomaticTranslationFactory'; export class ATServiceListener { - static SERVICE_NAME = 'AutomaticTranslation'; + static SERVICE_NAME = 'translations'; private taskManager: TaskManager; @@ -20,6 +21,7 @@ export class ATServiceListener { } await tenants.run(async () => { + permissionsContext.setCommandContext(); await ATFactory.defaultSaveEntityTranslations().execute(result); }, result.key[0]); }, diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts index 6113681746..35e04ce5d6 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATEntityCreatedListener.spec.ts @@ -4,25 +4,52 @@ import { RequestEntityTranslation } from 'api/externalIntegrations.v2/automaticT import { testingEnvironment } from 'api/utils/testingEnvironment'; import { AutomaticTranslationFactory } from 'api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { getFixturesFactory } from 'api/utils/fixturesFactory'; +import { tenants } from 'api/tenants'; +import { DefaultTransactionManager } from 'api/common.v2/database/data_source_defaults'; +import { ATConfigService } from 'api/externalIntegrations.v2/automaticTranslation/services/GetAutomaticTranslationConfig'; +import { DefaultSettingsDataSource } from 'api/settings.v2/database/data_source_defaults'; +import { MongoATConfigDataSource } from 'api/externalIntegrations.v2/automaticTranslation/infrastructure/MongoATConfigDataSource'; +import { getConnection } from 'api/common.v2/database/getConnectionForCurrentTenant'; +import { DefaultTemplatesDataSource } from 'api/templates.v2/database/data_source_defaults'; +import { ATExternalAPI } from 'api/externalIntegrations.v2/automaticTranslation/infrastructure/ATExternalAPI'; import { ATEntityCreationListener } from '../ATEntityCreationListener'; const factory = getFixturesFactory(); +const prepareATFactory = (executeSpy: jest.Mock) => { + // @ts-ignore + const ATFactory: typeof AutomaticTranslationFactory = { + defaultATConfigService() { + const transactionManager = DefaultTransactionManager(); + return new ATConfigService( + DefaultSettingsDataSource(transactionManager), + new MongoATConfigDataSource(getConnection(), transactionManager), + DefaultTemplatesDataSource(transactionManager), + new ATExternalAPI() + ); + }, + defaultRequestEntityTranslation() { + return { execute: executeSpy } as unknown as RequestEntityTranslation; + }, + }; + + return ATFactory; +}; + describe('ATEntityCreationListener', () => { let listener: ATEntityCreationListener; const eventBus: EventsBus = new EventsBus(); - let requestEntityTranslation: RequestEntityTranslation; + let executeSpy: jest.Mock; beforeEach(async () => { await testingEnvironment.setUp({ - settings: [{ features: { automaticTranslation: { active: true } } }], + settings: [{ features: { automaticTranslation: { active: false } } }], }); await testingEnvironment.setTenant('tenant'); - requestEntityTranslation = AutomaticTranslationFactory.defaultRequestEntityTranslation(); - jest.spyOn(requestEntityTranslation, 'execute'); + executeSpy = jest.fn(); - listener = new ATEntityCreationListener(requestEntityTranslation, eventBus); + listener = new ATEntityCreationListener(eventBus, prepareATFactory(executeSpy)); listener.start(); }); @@ -31,16 +58,34 @@ describe('ATEntityCreationListener', () => { }); describe('Request entity translation', () => { + it('should not request translations if feature flag is off', async () => { + const entityCreationEvent = new EntityCreatedEvent({ + entities: [{ sharedId: 'entity 1' }], + targetLanguageKey: 'en', + }); + + await tenants.run(async () => { + await eventBus.emit(entityCreationEvent); + }, 'tenant'); + + expect(executeSpy).not.toHaveBeenCalled(); + }); + it('should call RequestEntityTranslation on receiving entity creation event', async () => { + await testingEnvironment.setFixtures({ + settings: [{ features: { automaticTranslation: { active: true } } }], + }); const entityEn = factory.entity('entity1', 'template1', {}, { language: 'en' }); const entityCreationEvent = new EntityCreatedEvent({ entities: [factory.entity('entity1', 'template1', {}, { language: 'es' }), entityEn], targetLanguageKey: 'en', }); - await eventBus.emit(entityCreationEvent); + await tenants.run(async () => { + await eventBus.emit(entityCreationEvent); + }, 'tenant'); - expect(requestEntityTranslation.execute).toHaveBeenCalledWith(entityEn); + expect(executeSpy).toHaveBeenCalledWith(entityEn); }); }); }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts index 1a18cb2d68..d596a9ad91 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/adapters/driving/specs/ATServiceListener.spec.ts @@ -5,16 +5,12 @@ import RedisSMQ from 'rsmq'; import waitForExpect from 'wait-for-expect'; import { AutomaticTranslationFactory } from 'api/externalIntegrations.v2/automaticTranslation/AutomaticTranslationFactory'; import { testingEnvironment } from 'api/utils/testingEnvironment'; -import { GenerateAutomaticTranslationsCofig } from 'api/externalIntegrations.v2/automaticTranslation/GenerateAutomaticTranslationConfig'; import { SaveEntityTranslations } from 'api/externalIntegrations.v2/automaticTranslation/SaveEntityTranslations'; import { ATServiceListener } from '../ATServiceListener'; const prepareATFactory = (executeSpy: jest.Mock) => { // @ts-ignore const ATFactory: typeof AutomaticTranslationFactory = { - defaultGenerateATConfig() { - return {} as GenerateAutomaticTranslationsCofig; - }, defaultSaveEntityTranslations() { return { execute: executeSpy } as unknown as SaveEntityTranslations; }, @@ -57,7 +53,7 @@ describe('ATServiceListener', () => { await redisSMQ.createQueueAsync({ qname: queueName }); }; - await recreateQueue('AutomaticTranslation_results').catch(error => { + await recreateQueue(`${ATServiceListener.SERVICE_NAME}_results`).catch(error => { throw error; }); @@ -85,7 +81,7 @@ describe('ATServiceListener', () => { executeSpy.mockClear(); await redisSMQ.sendMessageAsync({ - qname: 'AutomaticTranslation_results', + qname: `${config.ENVIRONMENT}_${ATServiceListener.SERVICE_NAME}_results`, message: JSON.stringify(message), }); diff --git a/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts b/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts index 2b762cb80d..7a1ef6f342 100644 --- a/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts +++ b/app/api/externalIntegrations.v2/automaticTranslation/specs/RequestEntityTranslation.spec.ts @@ -87,21 +87,17 @@ describe('RequestEntityTranslation', () => { expect(taskManager.startTask).toHaveBeenCalledTimes(2); expect(taskManager.startTask).toHaveBeenCalledWith({ - params: { - key: ['tenant', 'entity1', 'title'], - text: 'entity1', - language_from: 'en', - languages_to: ['es'], - }, + key: ['tenant', 'entity1', factory.commonPropertiesTitleId('template1').toString()], + text: 'entity1', + language_from: 'en', + languages_to: ['es'], }); expect(taskManager.startTask).toHaveBeenCalledWith({ - params: { - key: ['tenant', 'entity1', 'text1'], - text: 'original text1', - language_from: 'en', - languages_to: ['es'], - }, + key: ['tenant', 'entity1', factory.property('text1')._id?.toString()], + text: 'original text1', + language_from: 'en', + languages_to: ['es'], }); }); diff --git a/app/api/utils/handleError.js b/app/api/utils/handleError.js index 044121352a..875c700c19 100644 --- a/app/api/utils/handleError.js +++ b/app/api/utils/handleError.js @@ -69,6 +69,7 @@ const prettifyError = (error, { req = {}, uncaught = false } = {}) => { } if (error instanceof Ajv.ValidationError) { + console.log(util.inspect(error)); result = { code: 422, message: error.message, validations: error.errors, logLevel: 'debug' }; } diff --git a/app/worker.ts b/app/worker.ts index d0cc7aeb02..c21548f498 100644 --- a/app/worker.ts +++ b/app/worker.ts @@ -13,6 +13,7 @@ import { InformationExtraction } from 'api/services/informationextraction/Inform import { setupWorkerSockets } from 'api/socketio/setupSockets'; import { ConvertToPdfWorker } from 'api/services/convertToPDF/ConvertToPdfWorker'; import { handleError } from './api/utils/handleError.js'; +import { ATServiceListener } from 'api/externalIntegrations.v2/automaticTranslation/adapters/driving/ATServiceListener'; let dbAuth = {}; @@ -42,6 +43,7 @@ DB.connect(config.DBHOST, dbAuth) console.info('==> 📡 starting external services...'); ocrManager.start(); + new ATServiceListener().start(); new InformationExtraction().start(); new ConvertToPdfWorker().start(); diff --git a/package.json b/package.json index 64f8b1c664..6d0de2e078 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.186.0-rc7", + "version": "1.187.0-rc2", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react" From a92a7cf26e35bc46c83ed10e8ab916f072d4a232 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:59:03 -0300 Subject: [PATCH 12/15] Bump eslint-plugin-import from 2.29.1 to 2.30.0 (#7281) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.1 to 2.30.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.1...v2.30.0) --- updated-dependencies: - dependency-name: eslint-plugin-import 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> --- package.json | 2 +- yarn.lock | 88 ++++++++++++++++++++++++++++------------------------ 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 6d0de2e078..47a1a0f64b 100644 --- a/package.json +++ b/package.json @@ -345,7 +345,7 @@ "eslint": "v8.57.0", "eslint-config-airbnb": "19.0.4", "eslint-plugin-cypress": "^3.5.0", - "eslint-plugin-import": "v2.29.1", + "eslint-plugin-import": "v2.30.0", "eslint-plugin-jasmine": "4.2.1", "eslint-plugin-jest": "v28.8.2", "eslint-plugin-jsx-a11y": "6.10.0", diff --git a/yarn.lock b/yarn.lock index 58b1e4e35e..18bbbdbcba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3250,6 +3250,11 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@sentry-internal/feedback@7.114.0": version "7.114.0" resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.114.0.tgz#8a1c3d8bbd014c1823d30b9b1128eb244d357c3e" @@ -6231,7 +6236,7 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" -array-includes@^3.1.6, array-includes@^3.1.7, array-includes@^3.1.8: +array-includes@^3.1.6, array-includes@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== @@ -6276,16 +6281,17 @@ array.prototype.findlast@^1.2.5: es-object-atoms "^1.0.0" es-shim-unscopables "^1.0.2" -array.prototype.findlastindex@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" - integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== +array.prototype.findlastindex@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: version "1.3.2" @@ -9333,10 +9339,10 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== +eslint-module-utils@^2.9.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz#fe4cfb948d61f49203d7b08871982b65b9af0b0b" + integrity sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg== dependencies: debug "^3.2.7" @@ -9355,26 +9361,27 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@v2.29.1: - version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== +eslint-plugin-import@v2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" + integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" array.prototype.flat "^1.3.2" array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" + eslint-module-utils "^2.9.0" + hasown "^2.0.2" + is-core-module "^2.15.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" semver "^6.3.1" tsconfig-paths "^3.15.0" @@ -11449,12 +11456,12 @@ is-ci@^3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== +is-core-module@^2.13.0, is-core-module@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-data-view@^1.0.1: version "1.0.1" @@ -13902,7 +13909,7 @@ object.entries@^1.1.1, object.entries@^1.1.5, object.entries@^1.1.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -object.fromentries@^2.0.7, object.fromentries@^2.0.8: +object.fromentries@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== @@ -13912,15 +13919,14 @@ object.fromentries@^2.0.7, object.fromentries@^2.0.8: es-abstract "^1.23.2" es-object-atoms "^1.0.0" -object.groupby@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" - integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" object.map@^1.0.1: version "1.0.1" @@ -13936,7 +13942,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.1, object.values@^1.1.6, object.values@^1.1.7, object.values@^1.2.0: +object.values@^1.1.1, object.values@^1.1.6, object.values@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== From 35843b001eca15e4a4f7f8de204897b32ef70f82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:17:51 -0300 Subject: [PATCH 13/15] Bump big.js from 6.2.1 to 6.2.2 (#7280) Bumps [big.js](https://github.com/MikeMcl/big.js) from 6.2.1 to 6.2.2. - [Changelog](https://github.com/MikeMcl/big.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/big.js/commits) --- updated-dependencies: - dependency-name: big.js 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> Co-authored-by: Santiago <71732018+Zasa-san@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 47a1a0f64b..260cd88825 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "ajv-keywords": "^5.1.0", "any-date-parser": "^1.5.4", "bcryptjs": "^2.4.3", - "big.js": "^6.2.1", + "big.js": "^6.2.2", "body-parser": "^1.20.3", "bootstrap": "3.4.1", "child-process-promise": "^2.2.1", diff --git a/yarn.lock b/yarn.lock index 18bbbdbcba..28218f1d76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6646,10 +6646,10 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -big.js@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" - integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== +big.js@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.2.tgz#be3bb9ac834558b53b099deef2a1d06ac6368e1a" + integrity sha512-y/ie+Faknx7sZA5MfGA2xKlu0GDv8RWrXGsmlteyJQ2lvoKv9GBK/fpRMc2qlSoBAgNxrixICFCBefIq8WCQpQ== binary-extensions@^2.0.0: version "2.1.0" From f22979ec6a50d26a641f9a2004f894ed3ddbbd82 Mon Sep 17 00:00:00 2001 From: txau Date: Wed, 2 Oct 2024 10:39:28 -0600 Subject: [PATCH 14/15] Upgraded icon lib and fixed css imports --- app/react/App/App.js | 2 +- app/react/App/styles/globals.css | 218 +++++++++--------- .../Forms/components/IconSelectorItem.js | 2 +- .../components/specs/IconSelectorItem.spec.js | 2 +- app/react/Layout/Icon.js | 2 +- app/react/Layout/specs/Icon.spec.js | 4 +- .../components/specs/TableRow.spec.tsx | 2 +- package.json | 2 +- webpack/config.js | 3 +- yarn.lock | 8 +- 10 files changed, 123 insertions(+), 122 deletions(-) diff --git a/app/react/App/App.js b/app/react/App/App.js index 818560b954..516de6fae6 100644 --- a/app/react/App/App.js +++ b/app/react/App/App.js @@ -19,7 +19,7 @@ import { CleanInsights } from 'app/V2/Components/Analitycs'; import 'react-widgets/dist/css/react-widgets.css'; import 'bootstrap/dist/css/bootstrap.css'; import 'nprogress/nprogress.css'; -import 'flag-icon-css/sass/flag-icons.scss'; +import 'flag-icons/sass/flag-icons.scss'; import './scss/styles.scss'; import './styles/globals.css'; import 'flowbite'; diff --git a/app/react/App/styles/globals.css b/app/react/App/styles/globals.css index beb79f6b66..503dc0a90c 100644 --- a/app/react/App/styles/globals.css +++ b/app/react/App/styles/globals.css @@ -1,113 +1,5 @@ -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(99 102 241 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(99 102 241 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} - /* -! tailwindcss v3.4.12 | MIT License | https://tailwindcss.com +! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com */ /* @@ -995,6 +887,114 @@ input[type="range"]::-ms-fill-lower { font-family: 'Inter', sans-serif !important; } +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(99 102 241 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(99 102 241 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + .container { width: 100%; } diff --git a/app/react/Forms/components/IconSelectorItem.js b/app/react/Forms/components/IconSelectorItem.js index 5b8a8d1257..1b4f2d58a8 100644 --- a/app/react/Forms/components/IconSelectorItem.js +++ b/app/react/Forms/components/IconSelectorItem.js @@ -23,7 +23,7 @@ export default class IconSelectorItem extends Component { } if (item.type === 'Flags') { - const className = `flag-icon flag-icon-${CountryList.get(item._id).cca2}`.toLowerCase(); + const className = `fi fi-${CountryList.get(item._id).cca2}`.toLowerCase(); icon = ( diff --git a/app/react/Forms/components/specs/IconSelectorItem.spec.js b/app/react/Forms/components/specs/IconSelectorItem.spec.js index af15014d58..f172cc4a75 100644 --- a/app/react/Forms/components/specs/IconSelectorItem.spec.js +++ b/app/react/Forms/components/specs/IconSelectorItem.spec.js @@ -25,7 +25,7 @@ describe('IconSelectorItem', () => { props = { item: { _id: 'JPN', type: 'Flags', label: 'Flag Label' } }; render(); - expect(component.find('span.flag-icon').props().className).toContain('flag-icon-jp'); + expect(component.find('span.fi').props().className).toContain('fi-jp'); expect(component.text()).toContain('Flag Label'); }); diff --git a/app/react/Layout/Icon.js b/app/react/Layout/Icon.js index 13b3643a6d..761b0477ae 100644 --- a/app/react/Layout/Icon.js +++ b/app/react/Layout/Icon.js @@ -42,7 +42,7 @@ export class Icon extends Component { } if (_data.type === 'Flags') { - const flagClassName = `flag-icon flag-icon-${CountryList.get(_data._id).cca2}`.toLowerCase(); + const flagClassName = `fi fi-${CountryList.get(_data._id).cca2}`.toLowerCase(); const componentClassName = `${className} ${flagClassName}`; icon = ; } diff --git a/app/react/Layout/specs/Icon.spec.js b/app/react/Layout/specs/Icon.spec.js index 0118ab8b8c..be4e9a8138 100644 --- a/app/react/Layout/specs/Icon.spec.js +++ b/app/react/Layout/specs/Icon.spec.js @@ -51,8 +51,8 @@ describe('Icon', () => { it('should render a Flag icon', () => { render(); - expect(component.find('span.flag-icon').props().className).toContain('passed-flag-classname'); - expect(component.find('span.flag-icon').props().className).toContain('flag-icon-jp'); + expect(component.find('span.fi').props().className).toContain('passed-flag-classname'); + expect(component.find('span.fi').props().className).toContain('fi-jp'); }); }); }); diff --git a/app/react/Library/components/specs/TableRow.spec.tsx b/app/react/Library/components/specs/TableRow.spec.tsx index a17d527d04..f8d2a138dc 100644 --- a/app/react/Library/components/specs/TableRow.spec.tsx +++ b/app/react/Library/components/specs/TableRow.spec.tsx @@ -148,7 +148,7 @@ describe('TableRow', () => { render(); const renderedColumns = screen.getAllByRole('cell'); const content = renderedColumns.map(col => col.textContent); - const icons = renderResult.container.getElementsByClassName('flag-icon-co'); + const icons = renderResult.container.getElementsByClassName('fi-co'); const entityIcon = icons[0]; expect(icons.length).toBe(1); expect(entityIcon.parentNode!.parentNode!.parentNode!).toEqual(renderedColumns[0]); diff --git a/package.json b/package.json index 260cd88825..09f29bc9bf 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "express-prom-bundle": "^7.0.0", "express-session": "^1.18.0", "filesize": "10.1.6", - "flag-icon-css": "^4.1.7", + "flag-icons": "^7.2.3", "flowbite": "^2.3.0", "flowbite-datepicker": "^1.2.7", "flowbite-react": "^0.10.1", diff --git a/webpack/config.js b/webpack/config.js index 63bbadb5d5..6992a1ba52 100644 --- a/webpack/config.js +++ b/webpack/config.js @@ -154,7 +154,8 @@ module.exports = production => { from: 'node_modules/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf', to: 'codicon.ttf', }, - { from: 'node_modules/flag-icon-css/flags/4x3/', to: 'flags/4x3/' }, + { from: 'node_modules/flag-icons/flags/4x3/', to: 'flags/4x3/' }, + { from: 'node_modules/flag-icons/flags/1x1/', to: 'flags/1x1/' }, { from: 'node_modules/pdfjs-dist/cmaps/', to: 'legacy_character_maps' }, { from: 'node_modules/leaflet/dist/images/', to: 'CSS/images' }, { from: 'node_modules/leaflet/dist/images/', to: 'images' }, diff --git a/yarn.lock b/yarn.lock index 28218f1d76..946b0ce8af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10191,10 +10191,10 @@ fined@^2.0.0: object.pick "^1.3.0" parse-filepath "^1.0.2" -flag-icon-css@^4.1.7: - version "4.1.7" - resolved "https://registry.yarnpkg.com/flag-icon-css/-/flag-icon-css-4.1.7.tgz#5471197f9ab965a3603b3e0face31dd513fec289" - integrity sha512-AFjSU+fv98XbU0vnTQ32vcLj89UEr1MhwDFcooQv14qWJCjg9fGZzfh9BVyDhAhIOZW/pGmJmq38RqpgPaeybQ== +flag-icons@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/flag-icons/-/flag-icons-7.2.3.tgz#b67f379fa0ef28c4e605319a78035131bdd8ced7" + integrity sha512-X2gUdteNuqdNqob2KKTJTS+ZCvyWeLCtDz9Ty8uJP17Y4o82Y+U/Vd4JNrdwTAjagYsRznOn9DZ+E/Q52qbmqg== flagged-respawn@^2.0.0: version "2.0.0" From b027984416b0e96d310f97c97fbed3ddc26083a3 Mon Sep 17 00:00:00 2001 From: Joao-vi Date: Fri, 4 Oct 2024 09:36:54 -0400 Subject: [PATCH 15/15] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1b16f66b0b..13695d688f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.187.0-rc5", + "version": "1.187.0-rc6", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react"