diff --git a/packages/backend/package.json b/packages/backend/package.json index f62e3e3..f8c5854 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -27,7 +27,7 @@ "graphql-shield": "^7.6.3", "i18next": "^25.3.2", "jsonwebtoken": "^9.0.2", - "object-hash": "^2.2.0", + "object-hash": "3", "uuid": "^8.3.2" }, "devDependencies": { @@ -36,7 +36,7 @@ "@types/i18n": "^0.13.0", "@types/jest": "^29.1.2", "@types/jsonwebtoken": "^9.0.3", - "@types/object-hash": "^2.2.1", + "@types/object-hash": "^3.0.6", "@types/uuid": "^8.3.0", "jest": "^30.0.5", "ts-jest": "^29.0.3" diff --git a/packages/print/package.json b/packages/print/package.json index 5eef14e..932d311 100644 --- a/packages/print/package.json +++ b/packages/print/package.json @@ -12,7 +12,7 @@ "dependencies": { "@lara/api": "^1.0.0", "@lara/components": "^1.0.0", - "@sparticuz/chromium": "^117.0.0", + "@sparticuz/chromium": "^138.0.2", "adm-zip": "^0.5.10", "aws-sdk": "^2.950.0", "puppeteer-core": "^24.16.0", diff --git a/packages/print/src/handler.ts b/packages/print/src/handler.ts index 2d8a633..cf8afd5 100644 --- a/packages/print/src/handler.ts +++ b/packages/print/src/handler.ts @@ -50,14 +50,13 @@ export const handler: Handler = async (payloa let browser: Browser | undefined const { reportsData, userData, printTranslations, emailTranslations } = exportData - const headlessMode = chromium.headless === 'new' ? 'shell' : chromium.headless + const headlessMode: boolean | 'shell' = IS_OFFLINE ? true : 'shell' try { browser = await launch({ args: chromium.args, - defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath(), - headless: IS_OFFLINE ? true : headlessMode, + headless: headlessMode, acceptInsecureCerts: true, }) diff --git a/yarn.lock b/yarn.lock index 48e6fac..89108a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4535,13 +4535,13 @@ "@smithy/types" "^4.3.2" tslib "^2.6.2" -"@sparticuz/chromium@^117.0.0": - version "117.0.0" - resolved "https://registry.yarnpkg.com/@sparticuz/chromium/-/chromium-117.0.0.tgz#fc7f1ed22339415921fbb8eecd45deaea305a4ef" - integrity sha512-MXvxLgGt7e1bjOu6AwpemRnhrF+wxLxsHpkiOuJOLsfHAtT0VNlsnhAULQZ7hNXGhr37cTM2sCifUHwgrVH+sA== +"@sparticuz/chromium@^138.0.2": + version "138.0.2" + resolved "https://registry.yarnpkg.com/@sparticuz/chromium/-/chromium-138.0.2.tgz#8bb5abb7a26a2157d03bad9eae60c0a8b5b97a51" + integrity sha512-vs5qUiK6kFCzLCxZ2buWONcB6jdF3VWdYp6kH1tt56tZ78p51dMAxfWsfk9P62z/jAeqbVg4V6Rb3Ic4aAeOKQ== dependencies: - follow-redirects "^1.15.2" - tar-fs "^3.0.4" + follow-redirects "^1.15.9" + tar-fs "^3.1.0" "@styled-system/background@^5.1.2": version "5.1.2" @@ -5095,10 +5095,10 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== -"@types/object-hash@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-2.2.1.tgz#67c169f8f033e0b62abbf81df2d00f4598d540b9" - integrity sha512-i/rtaJFCsPljrZvP/akBqEwUP2y5cZLOmvO+JaYnz01aPknrQ+hB5MRcO7iqCUsFaYfTG8kGfKUyboA07xeDHQ== +"@types/object-hash@^3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-3.0.6.tgz#25c052428199d374ef723b7b0ed44b5bfe1b3029" + integrity sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w== "@types/parse-json@^4.0.0": version "4.0.2" @@ -9682,7 +9682,7 @@ focus-lock@^1.3.6: dependencies: tslib "^2.0.3" -follow-redirects@^1.0.0, follow-redirects@^1.15.2, follow-redirects@^1.15.6: +follow-redirects@^1.0.0, follow-redirects@^1.15.6, follow-redirects@^1.15.9: version "1.15.11" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== @@ -14155,12 +14155,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== - -object-hash@^3.0.0: +object-hash@3, object-hash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== @@ -17063,7 +17058,7 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.2.tgz#ab4984340d30cb9989a490032f086dbb8b56d872" integrity sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg== -tar-fs@^3.0.4, tar-fs@^3.1.0: +tar-fs@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.1.0.tgz#4675e2254d81410e609d91581a762608de999d25" integrity sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==