From 22128fd0c311d65e0a5b60e4d229205feb2bf219 Mon Sep 17 00:00:00 2001 From: rpapani <41927501+rpapani@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:50:50 -0700 Subject: [PATCH 01/26] feat: opportunities audit (#360) --- package-lock.json | 77 ++----------------- package.json | 2 +- src/index.js | 2 + src/opportunities/opportunities.js | 69 +++++++++++++++++ test/audits/opportunities.test.js | 109 +++++++++++++++++++++++++++ test/fixtures/opportunitiesdata.json | 65 ++++++++++++++++ 6 files changed, 251 insertions(+), 73 deletions(-) create mode 100644 src/opportunities/opportunities.js create mode 100644 test/audits/opportunities.test.js create mode 100644 test/fixtures/opportunitiesdata.json diff --git a/package-lock.json b/package-lock.json index bddacf04..f450532a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@adobe/spacecat-shared-ahrefs-client": "1.5.1", "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-http-utils": "1.6.8", - "@adobe/spacecat-shared-rum-api-client": "2.7.4", + "@adobe/spacecat-shared-rum-api-client": "2.8.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", "@adobe/spacecat-shared-utils": "1.19.6", "@aws-sdk/client-lambda": "3.637.0", @@ -4383,10 +4383,9 @@ } }, "node_modules/@adobe/spacecat-shared-rum-api-client": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-rum-api-client/-/spacecat-shared-rum-api-client-2.7.4.tgz", - "integrity": "sha512-0N3LClkMR7jKJGaqngL+e39XXYxO39lyjSKqYlzECDZGbbskNxs21zTzxpuOBFmpEBOow4xz23pcCVAPkhoKIA==", - "license": "Apache-2.0", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-rum-api-client/-/spacecat-shared-rum-api-client-2.8.0.tgz", + "integrity": "sha512-CNtQy6nYWErCJgG2YyFxej8hVBnoS8PItPNLvHRjEYXFpU9QhuoS+bSxcmDRbwRxMbHpAgK3XclddP6DFrKjDQ==", "dependencies": { "@adobe/fetch": "4.1.8", "@adobe/helix-shared-wrap": "2.0.2", @@ -4501,8 +4500,7 @@ "node_modules/@adobe/spacecat-shared-rum-api-client/node_modules/aws4": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.1.tgz", - "integrity": "sha512-u5w79Rd7SU4JaIlA/zFqG+gOiuq25q5VLyZ8E+ijJeILuTxVzZgp2CaGw/UTw6pXYN9XMO9yiqj/nEHmhTG5CA==", - "license": "MIT" + "integrity": "sha512-u5w79Rd7SU4JaIlA/zFqG+gOiuq25q5VLyZ8E+ijJeILuTxVzZgp2CaGw/UTw6pXYN9XMO9yiqj/nEHmhTG5CA==" }, "node_modules/@adobe/spacecat-shared-utils": { "version": "1.19.6", @@ -6677,7 +6675,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", @@ -6692,7 +6689,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" @@ -6705,7 +6701,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", @@ -6719,7 +6714,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" } @@ -6728,7 +6722,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", @@ -6739,7 +6732,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" @@ -6893,7 +6885,6 @@ "version": "3.609.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz", "integrity": "sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -6933,7 +6924,6 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", - "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", "@smithy/types": "^3.3.0", @@ -6949,7 +6939,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", - "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", "@smithy/property-provider": "^3.1.3", @@ -6965,7 +6954,6 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "license": "Apache-2.0", "dependencies": { "@smithy/protocol-http": "^4.1.0", "@smithy/querystring-builder": "^3.0.3", @@ -6978,7 +6966,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "@smithy/util-buffer-from": "^3.0.0", @@ -6993,7 +6980,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" @@ -7006,7 +6992,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7016,7 +7001,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -7028,7 +7012,6 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", - "license": "Apache-2.0", "dependencies": { "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", @@ -7042,7 +7025,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", - "license": "Apache-2.0", "dependencies": { "@smithy/middleware-serde": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", @@ -7080,7 +7062,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7093,7 +7074,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7106,7 +7086,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", @@ -7121,7 +7100,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", - "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^3.1.1", "@smithy/protocol-http": "^4.1.0", @@ -7137,7 +7115,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7150,7 +7127,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7163,7 +7139,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "@smithy/util-uri-escape": "^3.0.0", @@ -7177,7 +7152,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7190,7 +7164,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0" }, @@ -7202,7 +7175,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7215,7 +7187,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "@smithy/protocol-http": "^4.1.0", @@ -7262,7 +7233,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", - "license": "Apache-2.0", "dependencies": { "@smithy/querystring-parser": "^3.0.3", "@smithy/types": "^3.3.0", @@ -7273,7 +7243,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -7287,7 +7256,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" @@ -7300,7 +7268,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" } @@ -7309,7 +7276,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -7321,7 +7287,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -7367,7 +7332,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", - "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", "@smithy/types": "^3.3.0", @@ -7381,7 +7345,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -7393,7 +7356,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -7406,7 +7368,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", - "license": "Apache-2.0", "dependencies": { "@smithy/service-error-classification": "^3.0.3", "@smithy/types": "^3.3.0", @@ -7420,7 +7381,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", - "license": "Apache-2.0", "dependencies": { "@smithy/fetch-http-handler": "^3.2.4", "@smithy/node-http-handler": "^3.1.4", @@ -7439,7 +7399,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" @@ -7452,7 +7411,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -7464,7 +7422,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^3.0.0", "tslib": "^2.6.2" @@ -7477,7 +7434,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" @@ -7513,7 +7469,6 @@ "url": "https://paypal.me/naturalintelligence" } ], - "license": "MIT", "dependencies": { "strnum": "^1.0.5" }, @@ -16124,7 +16079,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16137,7 +16091,6 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "license": "Apache-2.0", "dependencies": { "@smithy/protocol-http": "^4.1.0", "@smithy/querystring-builder": "^3.0.3", @@ -16150,7 +16103,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -16162,7 +16114,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", - "license": "Apache-2.0", "dependencies": { "@smithy/middleware-serde": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", @@ -16180,7 +16131,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16193,7 +16143,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16206,7 +16155,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", @@ -16221,7 +16169,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", - "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^3.1.1", "@smithy/protocol-http": "^4.1.0", @@ -16237,7 +16184,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16250,7 +16196,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16263,7 +16208,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "@smithy/util-uri-escape": "^3.0.0", @@ -16277,7 +16221,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16290,7 +16233,6 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16320,7 +16262,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -16332,7 +16273,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", - "license": "Apache-2.0", "dependencies": { "@smithy/querystring-parser": "^3.0.3", "@smithy/types": "^3.3.0", @@ -16343,7 +16283,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -16357,7 +16296,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" @@ -16370,7 +16308,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -16382,7 +16319,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", - "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -16395,7 +16331,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", - "license": "Apache-2.0", "dependencies": { "@smithy/fetch-http-handler": "^3.2.4", "@smithy/node-http-handler": "^3.1.4", @@ -16414,7 +16349,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", - "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -16426,7 +16360,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", - "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^3.0.0", "tslib": "^2.6.2" diff --git a/package.json b/package.json index a21ae299..6062e7f5 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@adobe/spacecat-shared-ahrefs-client": "1.5.1", "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-http-utils": "1.6.8", - "@adobe/spacecat-shared-rum-api-client": "2.7.4", + "@adobe/spacecat-shared-rum-api-client": "2.8.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", "@aws-sdk/client-lambda": "3.637.0", "@aws-sdk/credential-provider-node": "3.637.0", diff --git a/src/index.js b/src/index.js index c52d4299..93fe763c 100644 --- a/src/index.js +++ b/src/index.js @@ -29,6 +29,7 @@ import experimentation from './experimentation/handler.js'; import conversion from './conversion/handler.js'; import essExperimentationDaily from './experimentation-ess/daily.js'; import essExperimentationAll from './experimentation-ess/all.js'; +import opportunities from './opportunities/opportunities.js'; import costs from './costs/handler.js'; const HANDLERS = { @@ -44,6 +45,7 @@ const HANDLERS = { conversion, 'experimentation-ess-daily': essExperimentationDaily, 'experimentation-ess-all': essExperimentationAll, + opportunities, costs, dummy: (message) => ok(message), }; diff --git a/src/opportunities/opportunities.js b/src/opportunities/opportunities.js new file mode 100644 index 00000000..4eff2b43 --- /dev/null +++ b/src/opportunities/opportunities.js @@ -0,0 +1,69 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +/* c8 ignore start */ +import RUMAPIClient from '@adobe/spacecat-shared-rum-api-client'; +import { AuditBuilder } from '../common/audit-builder.js'; +import { getRUMDomainkey } from '../support/utils.js'; + +const DAYS = 30; + +let log = console; + +/** + * Audit handler container for all the opportunities + * @param {*} auditUrl + * @param {*} context + * @param {*} site + * @returns + */ + +export async function opportunitiesHandler(auditUrl, context, site) { + log = context.log; + log.info(`Received Opportunities audit request for ${auditUrl}`); + const startTime = process.hrtime(); + + const rumAPIClient = RUMAPIClient.createFrom(context); + const domainkey = await getRUMDomainkey(site.getBaseURL(), context); + const options = { + domain: auditUrl, + domainkey, + interval: DAYS, + granularity: 'hourly', + }; + const experimentationHandlers = ['rageclick']; + const queryResults = await rumAPIClient.queryMulti(experimentationHandlers, options); + const auditData = { + experimentationOpportunities: [], + }; + for (const queryResult of Object.keys(queryResults)) { + if (experimentationHandlers.includes(queryResult)) { + auditData.experimentationOpportunities.push(...queryResults[queryResult]); + } + } + + const endTime = process.hrtime(startTime); + const elapsedSeconds = endTime[0] + endTime[1] / 1e9; + const formattedElapsed = elapsedSeconds.toFixed(2); + + log.info(`Opportunities Audit is completed in ${formattedElapsed} seconds for ${auditUrl}`); + + return { + auditResult: auditData, + fullAuditRef: auditUrl, + }; +} + +export default new AuditBuilder() + .withRunner(opportunitiesHandler) + .build(); +/* c8 ignore stop */ diff --git a/test/audits/opportunities.test.js b/test/audits/opportunities.test.js new file mode 100644 index 00000000..22905dfb --- /dev/null +++ b/test/audits/opportunities.test.js @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +/* eslint-env mocha */ + +import { expect, use } from 'chai'; +import sinon from 'sinon'; +import sinonChai from 'sinon-chai'; +import nock from 'nock'; +import { opportunitiesHandler } from '../../src/opportunities/opportunities.js'; +import { MockContextBuilder } from '../shared.js'; +import opportunitiesData from '../fixtures/opportunitiesdata.json' assert { type: 'json' }; + +use(sinonChai); + +describe('Opportunities Tests', () => { + const url = 'https://abc.com'; + let context; + let processEnvCopy; + let messageBodyJson; + let sandbox; + before('setup', function () { + sandbox = sinon.createSandbox(); + const mockDate = '2023-11-27T12:30:01.124Z'; + this.clock = sandbox.useFakeTimers({ + now: new Date(mockDate).getTime(), + }); + }); + + beforeEach('setup', () => { + messageBodyJson = { + type: '404', + url: 'https://abc.com', + auditContext: { + finalUrl: 'abc.com', + }, + }; + context = new MockContextBuilder() + .withSandbox(sandbox) + .withOverrides({ + env: { + AUDIT_RESULTS_QUEUE_URL: 'queueUrl', + AWS_REGION: 'us-east-1', + AWS_ACCESS_KEY_ID: 'some-key-id', + AWS_SECRET_ACCESS_KEY: 'some-secret-key', + AWS_SESSION_TOKEN: 'some-secret-token', + }, + runtime: { name: 'aws-lambda', region: 'us-east-1' }, + func: { package: 'spacecat-services', version: 'ci', name: 'test' }, + }) + .build(messageBodyJson); + processEnvCopy = { ...process.env }; + process.env = { + ...process.env, + ...context.env, + }; + }); + after('clean', function () { + this.clock.uninstall(); + }); + + afterEach(() => { + process.env = processEnvCopy; + nock.cleanAll(); + sinon.restore(); + }); + + it('fetch bundles for base url > process > send opportunities', async () => { + nock('https://secretsmanager.us-east-1.amazonaws.com/') + .post('/', (body) => body.SecretId === '/helix-deploy/spacecat-services/customer-secrets/abc_com/ci') + .reply(200, { + SecretString: JSON.stringify({ + RUM_DOMAIN_KEY: 'abc_dummy_key', + }), + }); + nock('https://abc.com') + .get('/') + .reply(200); + context.rumApiClient = { + queryMulti: sinon.stub().resolves(opportunitiesData), + }; + const site = { + getBaseURL: () => 'https://abc.com', + }; + const auditData = await opportunitiesHandler(url, context, site); + + expect(context.rumApiClient.queryMulti).calledWith( + ['rageclick'], + { + domain: 'https://abc.com', + domainkey: 'abc_dummy_key', + interval: 30, + granularity: 'hourly', + }, + ); + expect( + auditData.auditResult.experimentationOpportunities, + ).to.deep.equal(opportunitiesData.rageclick); + }); +}); diff --git a/test/fixtures/opportunitiesdata.json b/test/fixtures/opportunitiesdata.json new file mode 100644 index 00000000..fde23dbf --- /dev/null +++ b/test/fixtures/opportunitiesdata.json @@ -0,0 +1,65 @@ +{ + "rageclick": [ + { + "type": "rageclick", + "page": "https://abc.com/abc-adoption/survey", + "screenshot": "", + "trackedPageKPIName": "The percentage of users who click on the same element lot of times in a short period of time.", + "trackedPageKPIValue": 43.25513196480938, + "pageViews": 34100, + "samples": 341, + "metrics": [ + { + "type": "click", + "selector": ".abc-survey", + "value": 2111, + "targets": { + "https://abc.com/in/products/media_1c2c9e62626b7b4df13882c013438725ae05464d6.jpeg": 577, + "undefined": 1534 + }, + "samples": 138, + "mobileSamples": 106, + "desktopSamples": 32, + "percentage": 40.469208211143695 + }, + { + "type": "click", + "selector": ".abc-survey #abc-survey-next", + "value": 2160, + "targets": { + "https://abc.com/in/images/media_1c2c9e62626b7b4df13882c0134982380923890.jpeg": 141, + "https://abc.com/in/images/media_1c2c9e62626b7b4df13882c013498223987923afe.jpeg": 401, + "undefined": 1618 + }, + "samples": 157, + "mobileSamples": 96, + "desktopSamples": 61, + "percentage": 46.04105571847507 + } + ] + }, + { + "type": "rageclick", + "page": "https://abc.com/abc-adoption/account", + "screenshot": "", + "trackedPageKPIName": "The percentage of users who click on the same element lot of times in a short period of time.", + "trackedPageKPIValue": 8.771929824561402, + "pageViews": 11400, + "samples": 114, + "metrics": [ + { + "type": "click", + "selector": ".account #favorites", + "value": 138, + "targets": { + "undefined": 138 + }, + "samples": 10, + "mobileSamples": 9, + "desktopSamples": 1, + "percentage": 8.771929824561402 + } + ] + } + ] +} From aec653943269918ae08256228648f104fb4ee3da Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 26 Aug 2024 23:52:54 +0000 Subject: [PATCH 02/26] chore(release): 1.28.0 [skip ci] # [1.28.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.27.0...v1.28.0) (2024-08-26) ### Features * opportunities audit ([#360](https://github.com/adobe/spacecat-audit-worker/issues/360)) ([22128fd](https://github.com/adobe/spacecat-audit-worker/commit/22128fd0c311d65e0a5b60e4d229205feb2bf219)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 083af2e4..630e56cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.28.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.27.0...v1.28.0) (2024-08-26) + + +### Features + +* opportunities audit ([#360](https://github.com/adobe/spacecat-audit-worker/issues/360)) ([22128fd](https://github.com/adobe/spacecat-audit-worker/commit/22128fd0c311d65e0a5b60e4d229205feb2bf219)) + # [1.27.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.26.5...v1.27.0) (2024-08-26) diff --git a/package-lock.json b/package-lock.json index f450532a..76756114 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.27.0", + "version": "1.28.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.27.0", + "version": "1.28.0", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 6062e7f5..f973a11b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.27.0", + "version": "1.28.0", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From d7850193c94d6f6bc03134c1cfb00d28dd16f807 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:10:49 +0200 Subject: [PATCH 03/26] fix(deps): update dependency jsdom to v25 (#379) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76756114..a89de1f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@aws-sdk/client-sqs": "3.637.0", "@aws-sdk/credential-provider-node": "3.637.0", "diff": "5.2.0", - "jsdom": "24.1.1", + "jsdom": "25.0.0", "urijs": "1.19.11" }, "devDependencies": { @@ -26531,9 +26531,9 @@ } }, "node_modules/jsdom": { - "version": "24.1.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.1.tgz", - "integrity": "sha512-5O1wWV99Jhq4DV7rCLIoZ/UIhyQeDR7wHVyZAHAshbrvZsLs+Xzz7gtwnlJTJDjleiTKh54F4dXrX70vJQTyJQ==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.0.tgz", + "integrity": "sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ==", "license": "MIT", "dependencies": { "cssstyle": "^4.0.1", diff --git a/package.json b/package.json index f973a11b..1219ae60 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@aws-sdk/client-secrets-manager": "3.637.0", "@aws-sdk/client-sqs": "3.637.0", "diff": "5.2.0", - "jsdom": "24.1.1", + "jsdom": "25.0.0", "urijs": "1.19.11" }, "devDependencies": { From 959352ab8994246d855edfc70def3b61984a249c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 27 Aug 2024 06:13:45 +0000 Subject: [PATCH 04/26] chore(release): 1.28.1 [skip ci] ## [1.28.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.0...v1.28.1) (2024-08-27) ### Bug Fixes * **deps:** update dependency jsdom to v25 ([#379](https://github.com/adobe/spacecat-audit-worker/issues/379)) ([d785019](https://github.com/adobe/spacecat-audit-worker/commit/d7850193c94d6f6bc03134c1cfb00d28dd16f807)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 630e56cc..214fb5ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.28.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.0...v1.28.1) (2024-08-27) + + +### Bug Fixes + +* **deps:** update dependency jsdom to v25 ([#379](https://github.com/adobe/spacecat-audit-worker/issues/379)) ([d785019](https://github.com/adobe/spacecat-audit-worker/commit/d7850193c94d6f6bc03134c1cfb00d28dd16f807)) + # [1.28.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.27.0...v1.28.0) (2024-08-26) diff --git a/package-lock.json b/package-lock.json index a89de1f4..e7e3cff0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.0", + "version": "1.28.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.0", + "version": "1.28.1", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 1219ae60..3f3ee79b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.0", + "version": "1.28.1", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 3e6901d5c51c2ade763aeae7607ba8f476d55dce Mon Sep 17 00:00:00 2001 From: Damian Zehnder <16799758+dzehnder@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:15:47 +0200 Subject: [PATCH 05/26] feat: introduce structured data audit (#367) --- package-lock.json | 1256 ++++++++++++++++++++++++++- package.json | 1 + src/index.js | 2 + src/structured-data/handler.js | 135 +++ test/audits/structured-data.test.js | 283 ++++++ 5 files changed, 1636 insertions(+), 41 deletions(-) create mode 100644 src/structured-data/handler.js create mode 100644 test/audits/structured-data.test.js diff --git a/package-lock.json b/package-lock.json index e7e3cff0..795a98b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@adobe/helix-universal-logger": "3.0.18", "@adobe/spacecat-shared-ahrefs-client": "1.5.1", "@adobe/spacecat-shared-data-access": "1.43.3", + "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", "@adobe/spacecat-shared-rum-api-client": "2.8.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", @@ -2662,6 +2663,1170 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@adobe/spacecat-shared-google-client": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-google-client/-/spacecat-shared-google-client-1.2.2.tgz", + "integrity": "sha512-vsJXEDW/0NWMr32BpHXfefAebyzbXNqzi+iFQHaEuI4f46CpwhfwHq4YmqK4VNgHfEZ7CZ8ugndMkl0UAr7a8g==", + "dependencies": { + "@adobe/fetch": "4.1.8", + "@adobe/helix-universal": "5.0.5", + "@adobe/spacecat-shared-http-utils": "1.1.4", + "@adobe/spacecat-shared-utils": "1.15.1", + "@aws-sdk/client-secrets-manager": "3.637.0", + "google-auth-library": "9.14.0", + "googleapis": "142.0.0" + }, + "engines": { + "node": "^20.0.0 <21.0.0", + "npm": "^10.0.0 <11.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@adobe/spacecat-shared-http-utils": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-http-utils/-/spacecat-shared-http-utils-1.1.4.tgz", + "integrity": "sha512-bG45mBhgH5MkSMDwZBNrFGs3fmMDxvmCiJVJk4r9zTaixwtoK69y5hu2pay+Z6WicE6CrEDBoOzfXjc47Wi5WQ==", + "dependencies": { + "@adobe/fetch": "4.1.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@adobe/spacecat-shared-http-utils/node_modules/@adobe/fetch": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.1.2.tgz", + "integrity": "sha512-O7yA/NgQGkp/2SFOTrcSFOb91VMZH29QRE9dXev/K8xVJkIL1g1B8IqT2G8sRurgQw2CPBQ2H7GF/FHW/HBxKw==", + "dependencies": { + "debug": "4.3.4", + "http-cache-semantics": "4.1.1", + "lru-cache": "7.18.3" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@adobe/spacecat-shared-utils": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-utils/-/spacecat-shared-utils-1.15.1.tgz", + "integrity": "sha512-pXVCpo5IRvwPR47ENKAe8UIGF2gWpMtOPpuGDoWfzPL/FEeuqhPk32aTwdBHZuoc38KRtts95aBrHj8o8IQlsw==", + "dependencies": { + "@adobe/fetch": "4.1.2", + "@aws-sdk/client-s3": "3.574.0", + "@aws-sdk/client-sqs": "3.574.0", + "@json2csv/plainjs": "7.0.6" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@adobe/spacecat-shared-utils/node_modules/@adobe/fetch": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.1.2.tgz", + "integrity": "sha512-O7yA/NgQGkp/2SFOTrcSFOb91VMZH29QRE9dXev/K8xVJkIL1g1B8IqT2G8sRurgQw2CPBQ2H7GF/FHW/HBxKw==", + "dependencies": { + "debug": "4.3.4", + "http-cache-semantics": "4.1.1", + "lru-cache": "7.18.3" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32c/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/sha1-browser/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-s3": { + "version": "3.574.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.574.0.tgz", + "integrity": "sha512-198QLFeJEs3xgCkLcGD8r0IVCR+BTjXGbVpDYC0DCU7vWjINR8igwwnuA5kbCHDALXvWmkX5MVuAlDuawsUn6w==", + "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sso-oidc": "3.574.0", + "@aws-sdk/client-sts": "3.574.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-bucket-endpoint": "3.568.0", + "@aws-sdk/middleware-expect-continue": "3.572.0", + "@aws-sdk/middleware-flexible-checksums": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-location-constraint": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-sdk-s3": "3.572.0", + "@aws-sdk/middleware-signing": "3.572.0", + "@aws-sdk/middleware-ssec": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/signature-v4-multi-region": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@aws-sdk/xml-builder": "3.567.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/eventstream-serde-browser": "^2.2.0", + "@smithy/eventstream-serde-config-resolver": "^2.2.0", + "@smithy/eventstream-serde-node": "^2.2.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-blob-browser": "^2.2.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/hash-stream-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/md5-js": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-stream": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "@smithy/util-waiter": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-sqs": { + "version": "3.574.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sqs/-/client-sqs-3.574.0.tgz", + "integrity": "sha512-ktqfE2N30B3Tg996GqAuSdT8ur9NRA2cwxGtfBUq+aflUEmHPbdIbjwxibrJiDsuH2L53SDsNaGxyuMMj8SMfA==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sso-oidc": "3.574.0", + "@aws-sdk/client-sts": "3.574.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-sdk-sqs": "3.569.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/md5-js": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-sso": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.572.0.tgz", + "integrity": "sha512-S+xhScao5MD79AkrcHmFpEDk+CgoiuB/31WFcTcnrTio5TOUONAaT0QyscOIwRp7BZ7Aez7TBM+loTteJ+TQvg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.574.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.574.0.tgz", + "integrity": "sha512-WcR8AnFhx7bqhYwfSl3OrF0Pu0LfHGgSOnmmORHqRF7ykguE09M/WUlCCjTGmZjJZ1we3uF5Xg8Jg12eiD+bmw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.574.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-sts": { + "version": "3.574.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.574.0.tgz", + "integrity": "sha512-WNDSG9nipap/L1gGDkCQvU2u413HmVxMJKr41lBCibioz42Z4i6XkCr1etYwIjuVfGF6QPrsEsYLqRwlAC/BQg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sso-oidc": "3.574.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/core": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.572.0.tgz", + "integrity": "sha512-DBmf94qfN0dfaLl5EnNcq6TakWfOtVXYifHoTbX+VBwESj3rlY4W+W4mAnvBgAqDjlLFy7bBljmx+vnjnV73lg==", + "dependencies": { + "@smithy/core": "^1.4.2", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.568.0.tgz", + "integrity": "sha512-MVTQoZwPnP1Ev5A7LG+KzeU6sCB8BcGkZeDT1z1V5Wt7GPq0MgFQTSSjhImnB9jqRSZkl1079Bt3PbO6lfIS8g==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-http": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.568.0.tgz", + "integrity": "sha512-gL0NlyI2eW17hnCrh45hZV+qjtBquB+Bckiip9R6DIVRKqYcoILyiFhuOgf2bXeF23gVh6j18pvUvIoTaFWs5w==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/util-stream": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.572.0.tgz", + "integrity": "sha512-anlYZnpmVkfp9Gan+LcEkQvmRf/m0KcbR11th8sBEyI5lxMaHKXhnAtC/hEGT7e3L6rgNOrFYTPuSvllITD/Pg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.568.0", + "@aws-sdk/credential-provider-http": "3.568.0", + "@aws-sdk/credential-provider-ini": "3.572.0", + "@aws-sdk/credential-provider-process": "3.572.0", + "@aws-sdk/credential-provider-sso": "3.572.0", + "@aws-sdk/credential-provider-web-identity": "3.568.0", + "@aws-sdk/types": "3.567.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.572.0.tgz", + "integrity": "sha512-S6C/S6xYesDakEuzYvlY1DMMKLtKQxdbbygq3hfeG2R0jUt9KpRLsQXK8qrBuVCKa3WcnjN/30hp4g/iUWFU/w==", + "peer": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.572.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/client-sts": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.572.0.tgz", + "integrity": "sha512-jCQuH2qkbWoSY4wckLSfzf3OPh7zc7ZckEbIGGVUQar/JVff6EIbpQ+uNG29DDEOpdPPd8rrJsVuUlA/nvJdXA==", + "peer": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sso-oidc": "3.572.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.572.0.tgz", + "integrity": "sha512-05KzbAp77fEiQXqMeodXeMbT83FOqSyBrfSEMz6U8uBXeJCy8zPUjN3acqcbG55/HNJHUvg1cftqzy+fUz71gA==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.568.0", + "@aws-sdk/credential-provider-process": "3.572.0", + "@aws-sdk/credential-provider-sso": "3.572.0", + "@aws-sdk/credential-provider-web-identity": "3.568.0", + "@aws-sdk/types": "3.567.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "3.572.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.572.0.tgz", + "integrity": "sha512-hXcOytf0BadSm/MMy7MV8mmY0+Jv3mkavsHNBx0R82hw5ollD0I3JyOAaCtdUpztF0I72F8K+q8SpJQZ+EwArw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.572.0.tgz", + "integrity": "sha512-iIlnpJiDXFp3XC4hJNSiNurnU24mr3iLB3HoNa9efr944bo6XBl9FQdk3NssIkqzSmgyoB2CEUx/daBHz4XSow==", + "dependencies": { + "@aws-sdk/client-sso": "3.572.0", + "@aws-sdk/token-providers": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.572.0.tgz", + "integrity": "sha512-S6C/S6xYesDakEuzYvlY1DMMKLtKQxdbbygq3hfeG2R0jUt9KpRLsQXK8qrBuVCKa3WcnjN/30hp4g/iUWFU/w==", + "peer": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.572.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/client-sts": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.572.0.tgz", + "integrity": "sha512-jCQuH2qkbWoSY4wckLSfzf3OPh7zc7ZckEbIGGVUQar/JVff6EIbpQ+uNG29DDEOpdPPd8rrJsVuUlA/nvJdXA==", + "peer": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sso-oidc": "3.572.0", + "@aws-sdk/core": "3.572.0", + "@aws-sdk/credential-provider-node": "3.572.0", + "@aws-sdk/middleware-host-header": "3.567.0", + "@aws-sdk/middleware-logger": "3.568.0", + "@aws-sdk/middleware-recursion-detection": "3.567.0", + "@aws-sdk/middleware-user-agent": "3.572.0", + "@aws-sdk/region-config-resolver": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@aws-sdk/util-user-agent-browser": "3.567.0", + "@aws-sdk/util-user-agent-node": "3.568.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.2", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.1", + "@smithy/util-defaults-mode-node": "^2.3.1", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.572.0.tgz", + "integrity": "sha512-IkSu8p32tQZhKqwmfLZLGfYwNhsS/HUQBLnDMHJlr9VifmDqlTurcr+DwMCaMimuFhcLeb45vqTymKf/ro/OBw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "3.572.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.568.0.tgz", + "integrity": "sha512-ZJSmTmoIdg6WqAULjYzaJ3XcbgBzVy36lir6Y0UBMRGaxDgos1AARuX6EcYzXOl+ksLvxt/xMQ+3aYh1LWfKSw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.568.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.568.0.tgz", + "integrity": "sha512-uc/nbSpXv64ct/wV3Ksz0/bXAsEtXuoZu5J9FTcFnM7c2MSofa0YQrtrJ8cG65uGbdeiFoJwPA048BTG/ilhCA==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.572.0.tgz", + "integrity": "sha512-+NKWVK295rOEANU/ohqEfNjkcEdZao7z6HxkMXX4gu4mDpSsVU8WhYr5hp5k3PUhtaiPU8M1rdfQBrZQc4uttw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.572.0.tgz", + "integrity": "sha512-ysblGDRn1yy8TlKUrwhnFbl3RuMfbVW1rbtePClEYpC/1u9MsqPmm/fmWJJGKat7NclnsgpQyfSQ64DCuaEedg==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.567.0", + "@smithy/is-array-buffer": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.567.0.tgz", + "integrity": "sha512-zQHHj2N3in9duKghH7AuRNrOMLnKhW6lnmb7dznou068DJtDr76w475sHp2TF0XELsOGENbbBsOlN/S5QBFBVQ==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.567.0.tgz", + "integrity": "sha512-XiGTH4VxrJ5fj6zeF6UL5U5EuJwLqj9bHW5pB+EKfw0pmbnyqfRdYNt46v4GsQql2iVOq1Z/Fiv754nIItBI/A==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-logger": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.568.0.tgz", + "integrity": "sha512-BinH72RG7K3DHHC1/tCulocFv+ZlQ9SrPF9zYT0T1OT95JXuHhB7fH8gEABrc6DAtOdJJh2fgxQjPy5tzPtsrA==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.567.0.tgz", + "integrity": "sha512-rFk3QhdT4IL6O/UWHmNdjJiURutBCy+ogGqaNHf/RELxgXH3KmYorLwCe0eFb5hq8f6vr3zl4/iH7YtsUOuo1w==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.572.0.tgz", + "integrity": "sha512-ygQL1G2hWoJXkUGL/Xr5q9ojXCH8hgt/oKsxJtc5U8ZXw3SRlL6pCVE7+aiD0l8mgIGbW0vrL08Oc/jYWlakdw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-sdk-sqs": { + "version": "3.569.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sqs/-/middleware-sdk-sqs-3.569.0.tgz", + "integrity": "sha512-KT3KlMmOApfOiMM0CdlO9RYCsjw7CmCpA3Fg2Jbe/+ywQNROMNthfgILqKq3ri7uTmWgo4yR4iaaTiRlrBfpAg==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-signing": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.572.0.tgz", + "integrity": "sha512-/pEVgHnf8LsTG0hu9yqqvmLMknlKO5c19NM3J9qTWGLPfySi8tWrFuREAFKAxqJFgDw1IdFWd+dXIkodpbGwew==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-ssec": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.567.0.tgz", + "integrity": "sha512-lhpBwFi3Tcw+jlOdaCsg3lCAg4oOSJB00bW/aLTFeZWutwi9VexMmsddZllx99lN+LDeCjryNyVd2TCRCKwYhQ==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.572.0.tgz", + "integrity": "sha512-R4bBbLp1ywtF1kJoOX1juDMztKPWeQHNj6XuTvtruFDn1RdfnBlbM3+9rguRfH5s4V+xfl8SSWchnyo2cI00xg==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@aws-sdk/util-endpoints": "3.572.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.572.0.tgz", + "integrity": "sha512-xkZMIxek44F4YW5r9otD1O5Y/kDkgAb6JNJePkP1qPVojrkCmin3OFYAOZgGm+T4DZAQ5rWhpaqTAWmnRumYfw==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.572.0.tgz", + "integrity": "sha512-FD6FIi8py1ZAR53NjD2VXKDvvQUhhZu7CDUfC9gjAa7JDtv+rJvM9ZuoiQjaDnzzqYxTr4pKqqjLsd6+8BCSWA==", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "3.572.0", + "@aws-sdk/types": "3.567.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/types": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.567.0.tgz", + "integrity": "sha512-JBznu45cdgQb8+T/Zab7WpBmfEAh77gsk99xuF4biIb2Sw1mdseONdoGDjEJX57a25TzIv/WUJ2oABWumckz1A==", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/util-endpoints": { + "version": "3.572.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.572.0.tgz", + "integrity": "sha512-AIEC7ItIWBqkJLtqcSd0HG8tvdh3zVwqnKPHNrcfFay0Xonqx3p/qTCDwGosh5CM5hDGzyOSRA5PkacEDBTz9w==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/types": "^2.12.0", + "@smithy/util-endpoints": "^1.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.567.0.tgz", + "integrity": "sha512-cqP0uXtZ7m7hRysf3fRyJwcY1jCgQTpJy7BHB5VpsE7DXlXHD5+Ur5L42CY7UrRPrB6lc6YGFqaAOs5ghMcLyA==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/types": "^2.12.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.568.0.tgz", + "integrity": "sha512-NVoZoLnKF+eXPBvXg+KqixgJkPSrerR6Gqmbjwqbv14Ini+0KNKB0/MXas1mDGvvEgtNkHI/Cb9zlJ3KXpti2A==", + "dependencies": { + "@aws-sdk/types": "3.567.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/xml-builder": { + "version": "3.567.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.567.0.tgz", + "integrity": "sha512-Db25jK9sZdGa7PEQTdm60YauUVbeYGsSEMQOHGP6ifbXfCknqgkPgWV16DqAKJUsbII0xgkJ9LpppkmYal3K/g==", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/chunked-blob-reader": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.2.0.tgz", + "integrity": "sha512-3GJNvRwXBGdkDZZOGiziVYzDpn4j6zfyULHMDKAGIUo72yHALpE9CbhfQp/XcLNVoc1byfMpn6uW5H2BqPjgaQ==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.2.0.tgz", + "integrity": "sha512-VNB5+1oCgX3Fzs072yuRsUoC2N4Zg/LJ11DTxX3+Qu+Paa6AmbIF0E9sc2wthz9Psrk/zcOlTCyuposlIhPjZQ==", + "dependencies": { + "@smithy/util-base64": "^2.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/core": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.4.2.tgz", + "integrity": "sha512-2fek3I0KZHWJlRLvRTqxTEri+qV0GRHrJIoLFuBMZB4EMg4WgeBGfF0X6abnrNYpq55KJ6R4D6x4f0vLnhzinA==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.5.1", + "@smithy/middleware-retry": "^2.3.1", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.1", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/eventstream-codec": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", + "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/eventstream-serde-browser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.2.0.tgz", + "integrity": "sha512-UaPf8jKbcP71BGiO0CdeLmlg+RhWnlN8ipsMSdwvqBFigl5nil3rHOI/5GE3tfiuX8LvY5Z9N0meuU7Rab7jWw==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.2.0.tgz", + "integrity": "sha512-RHhbTw/JW3+r8QQH7PrganjNCiuiEZmpi6fYUAetFfPLfZ6EkiA08uN3EFfcyKubXQxOwTeJRZSQmDDCdUshaA==", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/eventstream-serde-node": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.2.0.tgz", + "integrity": "sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/eventstream-serde-universal": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.2.0.tgz", + "integrity": "sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==", + "dependencies": { + "@smithy/eventstream-codec": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/hash-blob-browser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.2.0.tgz", + "integrity": "sha512-SGPoVH8mdXBqrkVCJ1Hd1X7vh1zDXojNN1yZyZTZsCno99hVue9+IYzWDjq/EQDDXxmITB0gBmuyPh8oAZSTcg==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.2.0", + "@smithy/chunked-blob-reader-native": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/hash-stream-node": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.2.0.tgz", + "integrity": "sha512-aT+HCATOSRMGpPI7bi7NSsTNVZE/La9IaxLXWoVAYMxHT5hGO3ZOGEMZQg8A6nNL+pdFGtZQtND1eoY084HgHQ==", + "dependencies": { + "@smithy/types": "^2.12.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-google-client/node_modules/@smithy/md5-js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.2.0.tgz", + "integrity": "sha512-M26XTtt9IIusVMOWEAhIvFIr9jYj4ISPPGJROqw6vXngO3IYJCnVVSMFn4Tx1rUTG5BiKJNg9u2nxmBiZC5IlQ==", + "dependencies": { + "@smithy/types": "^2.12.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + } + }, "node_modules/@adobe/spacecat-shared-http-utils": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-http-utils/-/spacecat-shared-http-utils-1.6.8.tgz", @@ -22235,7 +23400,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -22273,7 +23437,6 @@ "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "dev": true, "engines": { "node": "*" } @@ -22405,8 +23568,7 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -22452,7 +23614,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -23615,7 +24776,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -23875,7 +25035,6 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.0.1" } @@ -24231,7 +25390,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -24243,7 +25401,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -24787,8 +25944,7 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -25147,7 +26303,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -25195,7 +26350,6 @@ "version": "6.4.0", "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.4.0.tgz", "integrity": "sha512-apAloYrY4dlBGlhauDAYSZveafb5U6+L9titing1wox6BvWM0TSXBp603zTrLpyLMGkrcFgohnUN150dFN/zOA==", - "dev": true, "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", @@ -25211,7 +26365,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==", - "dev": true, "dependencies": { "gaxios": "^6.0.0", "json-bigint": "^1.0.0" @@ -25254,7 +26407,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -25438,10 +26590,9 @@ } }, "node_modules/google-auth-library": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.7.0.tgz", - "integrity": "sha512-I/AvzBiUXDzLOy4iIZ2W+Zq33W4lcukQv1nl7C8WUA6SQwyQwUwu3waNmWNAvzds//FG8SZ+DnKnW/2k6mQS8A==", - "dev": true, + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.0.tgz", + "integrity": "sha512-Y/eq+RWVs55Io/anIsm24sDS8X79Tq948zVLGaa7+KlJYYqaGwp1YI37w48nzrNi12RgnzMrQD4NzdmCowT90g==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -25477,11 +26628,38 @@ "node": ">=14" } }, + "node_modules/googleapis": { + "version": "142.0.0", + "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-142.0.0.tgz", + "integrity": "sha512-LsU1ynez4/KNPwnFMSDI93pBEsETNdQPCrT3kz2qgiNg5H2pW4dKW+1VmENMkZ4u9lMxA89nnXD3nqWBJ0rruQ==", + "dependencies": { + "google-auth-library": "^9.0.0", + "googleapis-common": "^7.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/googleapis-common": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-7.2.0.tgz", + "integrity": "sha512-/fhDZEJZvOV3X5jmD+fKxMqma5q2Q9nZNSF3kn1F18tpxmA86BcTxAGBQdM0N89Z3bEaIs+HVznSmFJEAmMTjA==", + "dependencies": { + "extend": "^3.0.2", + "gaxios": "^6.0.3", + "google-auth-library": "^9.7.0", + "qs": "^6.7.0", + "url-template": "^2.0.8", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -25505,7 +26683,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", - "dev": true, "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -25567,7 +26744,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -25579,7 +26755,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -25591,7 +26766,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -25618,7 +26792,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -26236,7 +27409,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, "engines": { "node": ">=8" }, @@ -26647,7 +27819,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dev": true, "dependencies": { "bignumber.js": "^9.0.0" } @@ -26770,7 +27941,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "dev": true, "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -26781,7 +27951,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "dev": true, "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" @@ -28124,7 +29293,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -31225,7 +32393,6 @@ "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -32007,6 +33174,20 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -32628,7 +33809,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -33060,7 +34240,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -33186,7 +34365,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -34344,8 +35522,7 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/traverse": { "version": "0.6.8", @@ -34675,8 +35852,7 @@ "node_modules/url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", - "dev": true + "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" }, "node_modules/use-sync-external-store": { "version": "1.2.2", @@ -34757,8 +35933,7 @@ "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { "version": "5.94.0", @@ -34861,7 +36036,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/package.json b/package.json index 3f3ee79b..e0e75fd3 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@adobe/helix-universal-logger": "3.0.18", "@adobe/spacecat-shared-ahrefs-client": "1.5.1", "@adobe/spacecat-shared-data-access": "1.43.3", + "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", "@adobe/spacecat-shared-rum-api-client": "2.8.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", diff --git a/src/index.js b/src/index.js index 93fe763c..a99c7086 100644 --- a/src/index.js +++ b/src/index.js @@ -31,6 +31,7 @@ import essExperimentationDaily from './experimentation-ess/daily.js'; import essExperimentationAll from './experimentation-ess/all.js'; import opportunities from './opportunities/opportunities.js'; import costs from './costs/handler.js'; +import structuredData from './structured-data/handler.js'; const HANDLERS = { apex, @@ -47,6 +48,7 @@ const HANDLERS = { 'experimentation-ess-all': essExperimentationAll, opportunities, costs, + 'structured-data': structuredData, dummy: (message) => ok(message), }; diff --git a/src/structured-data/handler.js b/src/structured-data/handler.js new file mode 100644 index 00000000..21484a15 --- /dev/null +++ b/src/structured-data/handler.js @@ -0,0 +1,135 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import GoogleClient from '@adobe/spacecat-shared-google-client'; +import { isArray } from '@adobe/spacecat-shared-utils'; +import { AuditBuilder } from '../common/audit-builder.js'; + +/** + * Processes an audit of a set of pages from a site using Google's URL inspection tool. + * + * @async + * @function + * @param {string} baseURL - The base URL for the audit. + * @param {Object} context - The context object. + * @param {Array} pages - An array of page URLs to be audited. + * + * @returns {Promise>} - A promise that resolves to an array of objects, + * each containing the inspection URL, filtered index status result, and filtered rich results. + * If an error occurs during the inspection of a URL, the object will include an error message. + * + * @throws {Error} - Throws an error if the audit process fails. + */ +export async function processStructuredData(baseURL, context, pages) { + const { log } = context; + + let google; + try { + google = await GoogleClient.createFrom(context, baseURL); + } catch (error) { + log.error(`Failed to create Google client. Site was probably not onboarded to GSC yet. Error: ${error.message}`); + throw new Error(`Failed to create Google client. Site was probably not onboarded to GSC yet. Error: ${error.message}`); + } + + const urlInspectionResult = pages.map(async (page) => { + try { + const { inspectionResult } = await google.urlInspect(page); + log.info(`Successfully inspected URL: ${page}`); + + const filteredIndexStatusResult = { + verdict: inspectionResult?.indexStatusResult?.verdict, + lastCrawlTime: inspectionResult?.indexStatusResult?.lastCrawlTime, + }; + + const detectedItemTypes = []; + const filteredRichResults = inspectionResult?.richResultsResult?.detectedItems?.map( + (item) => { + detectedItemTypes.push(item?.richResultType); + const filteredItems = item?.items?.filter( + (issueItem) => issueItem?.issues?.some( + (issue) => issue?.severity === 'ERROR', + ), + )?.map((issueItem) => ({ + name: issueItem?.name, + issues: issueItem?.issues?.filter((issue) => issue?.severity === 'ERROR'), + })); + + return { + richResultType: item?.richResultType, + items: filteredItems, + }; + }, + )?.filter((item) => item.items.length > 0) ?? []; + + if (filteredRichResults.length > 0) { + filteredRichResults.verdict = inspectionResult?.richResultsResult?.verdict; + log.info(`Found ${filteredRichResults.length} rich results issues for URL: ${page}`); + } else { + log.info(`No rich results issues found for URL: ${page}`); + } + return { + inspectionUrl: page, + indexStatusResult: filteredIndexStatusResult, + richResults: inspectionResult?.richResultsResult + ? { + verdict: inspectionResult.richResultsResult.verdict, + detectedItemTypes, + detectedIssues: filteredRichResults, + } + : {}, + }; + } catch (error) { + log.error(`Failed to inspect URL: ${page}. Error: ${error.message}`); + return { + inspectionUrl: page, + error: error.message, + }; + } + }); + + const results = await Promise.allSettled(urlInspectionResult); + return results + .filter((result) => result.status === 'fulfilled') + .map((result) => result.value); +} + +export async function structuredDataHandler(baseURL, context, site) { + const { log } = context; + log.info(`Received structured data audit request for ${baseURL}`); + const startTime = process.hrtime(); + + const siteId = site.getId(); + + const structuredDataURLs = await site.getConfig().getIncludedURLs('structured-data'); + if (isArray(structuredDataURLs) && structuredDataURLs.length === 0) { + log.error(`No product detail pages found for site ID: ${siteId}`); + throw new Error(`No product detail pages found for site: ${baseURL}`); + } + + const auditResult = await processStructuredData(baseURL, context, structuredDataURLs); + + const endTime = process.hrtime(startTime); + const elapsedSeconds = endTime[0] + endTime[1] / 1e9; + const formattedElapsed = elapsedSeconds.toFixed(2); + + log.info(`Structured data audit completed in ${formattedElapsed} seconds for ${baseURL}`); + + return { + fullAuditRef: baseURL, + auditResult, + }; +} + +export default new AuditBuilder() + .withRunner(structuredDataHandler) + .withUrlResolver((site) => site.getBaseURL()) + .build(); diff --git a/test/audits/structured-data.test.js b/test/audits/structured-data.test.js new file mode 100644 index 00000000..71224293 --- /dev/null +++ b/test/audits/structured-data.test.js @@ -0,0 +1,283 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +/* eslint-env mocha */ +import GoogleClient from '@adobe/spacecat-shared-google-client'; +import { expect, use } from 'chai'; +import sinonChai from 'sinon-chai'; +import sinon from 'sinon'; + +import { structuredDataHandler } from '../../src/structured-data/handler.js'; +import { MockContextBuilder } from '../shared.js'; + +use(sinonChai); + +const sandbox = sinon.createSandbox(); +const message = { + type: 'structured-data', + url: 'https://www.example.com', +}; + +describe('URLInspect Audit', () => { + let context; + let googleClientStub; + let urlInspectStub; + let siteStub; + + let fullUrlInspectionResult; + + beforeEach(() => { + context = new MockContextBuilder() + .withSandbox(sandbox) + .withOverrides({ + log: { + info: sinon.stub(), + warn: sinon.stub(), + error: sinon.stub(), + }, + }) + .build(message); + + googleClientStub = { + urlInspect: sandbox.stub(), + }; + + urlInspectStub = googleClientStub.urlInspect; + siteStub = { + getId: () => '123', + getConfig: () => ({ + getIncludedURLs: () => ['https://example.com/product/1', 'https://example.com/product/2'], + }), + }; + + fullUrlInspectionResult = { + inspectionResult: { + inspectionResultLink: 'https://search.google.com/search-console/inspect?resource_id=https://www.example.com/', + indexStatusResult: { + verdict: 'PASS', + coverageState: 'Submitted and indexed', + robotsTxtState: 'ALLOWED', + indexingState: 'INDEXING_ALLOWED', + lastCrawlTime: '2024-08-13T22:35:22Z', + pageFetchState: 'SUCCESSFUL', + googleCanonical: 'https://www.example.com/foo', + userCanonical: 'https://www.example.com/foo', + referringUrls: [ + 'https://www.example.com/bar', + ], + crawledAs: 'MOBILE', + }, + mobileUsabilityResult: { + verdict: 'VERDICT_UNSPECIFIED', + }, + richResultsResult: { + verdict: 'PASS', + detectedItems: [ + { + richResultType: 'Product snippets', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "image"', + severity: 'ERROR', + }, + ], + }, + ], + }, + { + richResultType: 'Merchant listings', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "hasMerchantReturnPolicy"', + severity: 'WARNING', + }, + { + issueMessage: 'Missing field "shippingDetails"', + severity: 'ERROR', + }, + ], + }, + ], + }, + ], + }, + }, + }; + }); + + afterEach(() => { + sandbox.restore(); + }); + + it('should successfully return a filtered result of the url inspection result', async () => { + sandbox.stub(GoogleClient, 'createFrom').returns(googleClientStub); + urlInspectStub.resolves(fullUrlInspectionResult); + + const auditData = await structuredDataHandler('https://www.example.com', context, siteStub); + + expect(auditData.auditResult).to.deep.equal( + [ + { + inspectionUrl: 'https://example.com/product/1', + indexStatusResult: { + verdict: 'PASS', + lastCrawlTime: '2024-08-13T22:35:22Z', + }, + richResults: { + verdict: 'PASS', + detectedItemTypes: [ + 'Product snippets', + 'Merchant listings', + ], + detectedIssues: [ + { + richResultType: 'Product snippets', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "image"', + severity: 'ERROR', + }, + ], + }, + ], + }, + { + richResultType: 'Merchant listings', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "shippingDetails"', + severity: 'ERROR', + }, + ], + }, + ], + }, + ], + }, + }, + { + inspectionUrl: 'https://example.com/product/2', + indexStatusResult: { + verdict: 'PASS', + lastCrawlTime: '2024-08-13T22:35:22Z', + }, + richResults: { + verdict: 'PASS', + detectedItemTypes: [ + 'Product snippets', + 'Merchant listings', + ], + detectedIssues: [ + { + richResultType: 'Product snippets', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "image"', + severity: 'ERROR', + }, + ], + }, + ], + }, + { + richResultType: 'Merchant listings', + items: [ + { + name: 'Example Product Name', + issues: [ + { + issueMessage: 'Missing field "shippingDetails"', + severity: 'ERROR', + }, + ], + }, + ], + }, + ], + }, + }, + ], + ); + }); + + it('returns no rich results when there are no rich results errors', async () => { + sandbox.stub(GoogleClient, 'createFrom').returns(googleClientStub); + delete fullUrlInspectionResult.inspectionResult.richResultsResult; + urlInspectStub.resolves(fullUrlInspectionResult); + + const auditData = await structuredDataHandler('https://www.example.com', context, siteStub); + + expect(auditData.auditResult[0].richResults).to.deep.equal({}); + }); + + it('returns no rich results when there are no errors in rich results', async () => { + sandbox.stub(GoogleClient, 'createFrom').returns(googleClientStub); + fullUrlInspectionResult.inspectionResult + .richResultsResult.detectedItems[0].items[0].issues = []; + delete fullUrlInspectionResult.inspectionResult + .richResultsResult.detectedItems[1].items[0].issues[1]; + urlInspectStub.resolves(fullUrlInspectionResult); + + const auditData = await structuredDataHandler('https://www.example.com', context, siteStub); + + expect(auditData.auditResult[0].richResults.detectedIssues).to.deep.equal([]); + expect(auditData.auditResult[1].richResults.verdict).to.equal('PASS'); + }); + + it('throws error if there are no configured PDPs', async () => { + sandbox.stub(GoogleClient, 'createFrom').returns(googleClientStub); + siteStub.getConfig = () => ({ + getIncludedURLs: () => [], + }); + try { + await structuredDataHandler('https://www.example.com', context, siteStub); + } catch (error) { + expect(error.message).to.equal('No product detail pages found for site: https://www.example.com'); + } + }); + + it('throws error if site is not configured for google search console', async () => { + sandbox.stub(GoogleClient, 'createFrom').throws('No secrets found'); + + try { + await structuredDataHandler('https://www.example.com', context, siteStub); + } catch (error) { + expect(error.message).to.equal('Failed to create Google client. Site was probably not onboarded to GSC yet. Error: Sinon-provided No secrets found'); + } + }); + + it('throws error if google client fails to inspect URL', async () => { + urlInspectStub.rejects(new Error('Failed to inspect URL')); + sandbox.stub(GoogleClient, 'createFrom').returns(googleClientStub); + + try { + await structuredDataHandler('https://www.example.com', context, siteStub); + } catch (error) { + expect(error.message).to.equal('Failed to inspect URL: https://example.com/product/1. Error: Failed to inspect URL'); + } + }); +}); From c6a62079f0c6e2e92b8747a5c7fc258fd25a138f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 27 Aug 2024 09:18:04 +0000 Subject: [PATCH 06/26] chore(release): 1.29.0 [skip ci] # [1.29.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.1...v1.29.0) (2024-08-27) ### Features * introduce structured data audit ([#367](https://github.com/adobe/spacecat-audit-worker/issues/367)) ([3e6901d](https://github.com/adobe/spacecat-audit-worker/commit/3e6901d5c51c2ade763aeae7607ba8f476d55dce)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 214fb5ce..2b08e464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.29.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.1...v1.29.0) (2024-08-27) + + +### Features + +* introduce structured data audit ([#367](https://github.com/adobe/spacecat-audit-worker/issues/367)) ([3e6901d](https://github.com/adobe/spacecat-audit-worker/commit/3e6901d5c51c2ade763aeae7607ba8f476d55dce)) + ## [1.28.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.0...v1.28.1) (2024-08-27) diff --git a/package-lock.json b/package-lock.json index 795a98b7..4ba0ec59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.1", + "version": "1.29.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.1", + "version": "1.29.0", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index e0e75fd3..54322bbe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.28.1", + "version": "1.29.0", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 7b4a7d68c6aab87b1c48ee6e5b7f5080dd66ea7d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 06:47:34 +0000 Subject: [PATCH 07/26] chore(deps): update dependency @adobe/helix-deploy to v12.1.0 (#381) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ba0ec59..3d95cee1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@adobe/eslint-config-helix": "2.0.6", - "@adobe/helix-deploy": "12.0.10", + "@adobe/helix-deploy": "12.1.0", "@adobe/helix-universal": "5.0.5", "@adobe/semantic-release-coralogix": "1.1.31", "@adobe/semantic-release-skms-cmr": "1.1.2", @@ -122,9 +122,9 @@ } }, "node_modules/@adobe/helix-deploy": { - "version": "12.0.10", - "resolved": "https://registry.npmjs.org/@adobe/helix-deploy/-/helix-deploy-12.0.10.tgz", - "integrity": "sha512-HBvpcsh6MsTTVJ9OPCgklsoZPW1zfNjx2hk1LJZ4zd+lFCVGr6Iv3+Kg+LtHGVF+L9hDHaE3Vjfsr3BoksBArg==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/@adobe/helix-deploy/-/helix-deploy-12.1.0.tgz", + "integrity": "sha512-nTFXpupq0rUpLyE9mYRB07OHQyanZi4e/B4wVkNUBPeZOlOJcdGgdf3nxjeaLg8Pt+B+TPwPS+HYvk0KNA79VA==", "dev": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 54322bbe..497fa412 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ }, "devDependencies": { "@adobe/eslint-config-helix": "2.0.6", - "@adobe/helix-deploy": "12.0.10", + "@adobe/helix-deploy": "12.1.0", "@adobe/helix-universal": "5.0.5", "@adobe/semantic-release-coralogix": "1.1.31", "@adobe/semantic-release-skms-cmr": "1.1.2", From c0add98e5b1a794284bcb72624c284f0aed6593d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ekrem=20Do=C4=9Fan?= Date: Wed, 28 Aug 2024 12:11:01 +0200 Subject: [PATCH 08/26] fix: audit context includes interval info (#383) --- src/cwv/handler.js | 3 +++ test/audits/cwv.test.js | 3 +++ test/fixtures/rum-data.js | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/cwv/handler.js b/src/cwv/handler.js index 0b485ba2..78d255b3 100644 --- a/src/cwv/handler.js +++ b/src/cwv/handler.js @@ -29,6 +29,9 @@ export async function CWVRunner(auditUrl, context, site) { const cwvData = await rumAPIClient.query('cwv', options); const auditResult = { cwv: cwvData.filter((data) => data.pageviews >= DAILY_THRESHOLD * INTERVAL), + auditContext: { + interval: INTERVAL, + }, }; return { diff --git a/test/audits/cwv.test.js b/test/audits/cwv.test.js index 9beca15e..28080c1c 100644 --- a/test/audits/cwv.test.js +++ b/test/audits/cwv.test.js @@ -63,6 +63,9 @@ describe('Index Tests', () => { expect(result).to.deep.equal({ auditResult: { cwv: rumData.filter((data) => data.pageviews >= 7000), + auditContext: { + interval: 7, + }, }, fullAuditRef: auditUrl, }); diff --git a/test/fixtures/rum-data.js b/test/fixtures/rum-data.js index de4712fe..65c18db5 100644 --- a/test/fixtures/rum-data.js +++ b/test/fixtures/rum-data.js @@ -21,7 +21,7 @@ export const rumData = [ inpCount: 3, ttfb: 520.4500000476837, ttfbCount: 18, - pageviews: 2620, + pageviews: 9620, }, { url: 'https://www.aem.live/developer/block-collection', @@ -33,7 +33,7 @@ export const rumData = [ inpCount: 2, ttfb: 122.90000003576279, ttfbCount: 4, - pageviews: 2000, + pageviews: 8000, }, { url: 'https://www.aem.live/docs/', @@ -45,7 +45,7 @@ export const rumData = [ inpCount: 8, ttfb: 96.97500000149012, ttfbCount: 16, - pageviews: 1910, + pageviews: 7910, }, { url: 'https://www.aem.live/tools/rum/explorer.html', @@ -57,7 +57,7 @@ export const rumData = [ inpCount: 5, ttfb: 312.69999980926514, ttfbCount: 9, - pageviews: 1600, + pageviews: 7600, }, { url: 'https://www.aem.live/developer/tutorial', From 64a08047a7edfe389d7dd5e4010663c6fe0a7a01 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 28 Aug 2024 10:13:17 +0000 Subject: [PATCH 09/26] chore(release): 1.29.1 [skip ci] ## [1.29.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.0...v1.29.1) (2024-08-28) ### Bug Fixes * audit context includes interval info ([#383](https://github.com/adobe/spacecat-audit-worker/issues/383)) ([c0add98](https://github.com/adobe/spacecat-audit-worker/commit/c0add98e5b1a794284bcb72624c284f0aed6593d)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b08e464..99cc319a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.29.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.0...v1.29.1) (2024-08-28) + + +### Bug Fixes + +* audit context includes interval info ([#383](https://github.com/adobe/spacecat-audit-worker/issues/383)) ([c0add98](https://github.com/adobe/spacecat-audit-worker/commit/c0add98e5b1a794284bcb72624c284f0aed6593d)) + # [1.29.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.28.1...v1.29.0) (2024-08-27) diff --git a/package-lock.json b/package-lock.json index 3d95cee1..9f59f6c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.0", + "version": "1.29.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.0", + "version": "1.29.1", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 497fa412..a8d3fd04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.0", + "version": "1.29.1", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 174444da61935e75b4af74f3ad6791cc14f50ac4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:15:27 +0000 Subject: [PATCH 10/26] chore(deps): update external fixes (#385) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 161 +++++++++++++++++++--------------------------- package.json | 6 +- 2 files changed, 69 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f59f6c4..74385f51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,13 +36,13 @@ "@adobe/helix-universal": "5.0.5", "@adobe/semantic-release-coralogix": "1.1.31", "@adobe/semantic-release-skms-cmr": "1.1.2", - "@redocly/cli": "1.21.0", + "@redocly/cli": "1.22.1", "@semantic-release/changelog": "6.0.3", "@semantic-release/exec": "6.0.3", "@semantic-release/git": "10.0.1", "@semantic-release/npm": "12.0.1", - "@typescript-eslint/eslint-plugin": "8.2.0", - "@typescript-eslint/parser": "8.2.0", + "@typescript-eslint/eslint-plugin": "8.3.0", + "@typescript-eslint/parser": "8.3.0", "c8": "10.1.2", "chai": "5.1.1", "chai-as-promised": "8.0.0", @@ -20363,13 +20363,13 @@ } }, "node_modules/@redocly/cli": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.21.0.tgz", - "integrity": "sha512-KPCHWrTXnIV01rgpgwnyQuwKhSol5pnNor20f6/szVrUcZ+vRCqKeZDR1CSMBYIXEsi0AknLV7WR8BCYyfYbog==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.22.1.tgz", + "integrity": "sha512-fGBj3KH32JH9Kg4Y3DQ2iF5jfpjT7T5ypA3JOpJcwGZTI/krDzrSxOb7ArX0HCATCBCobkWzDynHBF03j9oPvw==", "dev": true, "license": "MIT", "dependencies": { - "@redocly/openapi-core": "1.21.0", + "@redocly/openapi-core": "1.22.1", "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", @@ -20533,21 +20533,21 @@ } }, "node_modules/@redocly/config": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.9.0.tgz", - "integrity": "sha512-rRd0pSiPC68AQGud2VbrHqUov1VHospfcYE2pFYmGYfZhzZfHBSiVaeiTY+CZmrhf5RB9aVdOHRCm25Vb6GFkQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.10.1.tgz", + "integrity": "sha512-H3LnKVGzOaxskwJu8pmJYwBOWjP61qOK7TuTrbafqArDVckE06fhA6l0nO4KvBbjLPjy1Al7UnlxOu23V4Nl0w==", "dev": true, "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.21.0.tgz", - "integrity": "sha512-8KwL/0jiQBSJMNp1lSMLM1UeV2FW9DdqcjO0J9s5w7yL7ZN+SNh11MTp0zU4om/pGYExQ64hxLM/+7VdjznHRQ==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.22.1.tgz", + "integrity": "sha512-pjr456gJzrbwPvBjFKlWOd9nZEcr/dp6XSH0c8ijWGWv5K+V0vpUUy2zaTAVsFAoCydx1miEoOcbLhWQ9WC2nw==", "dev": true, "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.9.0", + "@redocly/config": "^0.10.1", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", @@ -22549,16 +22549,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.2.0.tgz", - "integrity": "sha512-02tJIs655em7fvt9gps/+4k4OsKULYGtLBPJfOsmOq1+3cdClYiF0+d6mHu6qDnTcg88wJBkcPLpQhq7FyDz0A==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz", + "integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.2.0", - "@typescript-eslint/type-utils": "8.2.0", - "@typescript-eslint/utils": "8.2.0", - "@typescript-eslint/visitor-keys": "8.2.0", + "@typescript-eslint/scope-manager": "8.3.0", + "@typescript-eslint/type-utils": "8.3.0", + "@typescript-eslint/utils": "8.3.0", + "@typescript-eslint/visitor-keys": "8.3.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -22582,15 +22583,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.2.0.tgz", - "integrity": "sha512-j3Di+o0lHgPrb7FxL3fdEy6LJ/j2NE8u+AP/5cQ9SKb+JLH6V6UHDqJ+e0hXBkHP1wn1YDFjYCS9LBQsZDlDEg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz", + "integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.2.0", - "@typescript-eslint/types": "8.2.0", - "@typescript-eslint/typescript-estree": "8.2.0", - "@typescript-eslint/visitor-keys": "8.2.0", + "@typescript-eslint/scope-manager": "8.3.0", + "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/typescript-estree": "8.3.0", + "@typescript-eslint/visitor-keys": "8.3.0", "debug": "^4.3.4" }, "engines": { @@ -22610,13 +22612,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.2.0.tgz", - "integrity": "sha512-OFn80B38yD6WwpoHU2Tz/fTz7CgFqInllBoC3WP+/jLbTb4gGPTy9HBSTsbDWkMdN55XlVU0mMDYAtgvlUspGw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz", + "integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.2.0", - "@typescript-eslint/visitor-keys": "8.2.0" + "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/visitor-keys": "8.3.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -22627,13 +22630,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.2.0.tgz", - "integrity": "sha512-g1CfXGFMQdT5S+0PSO0fvGXUaiSkl73U1n9LTK5aRAFnPlJ8dLKkXr4AaLFvPedW8lVDoMgLLE3JN98ZZfsj0w==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz", + "integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.2.0", - "@typescript-eslint/utils": "8.2.0", + "@typescript-eslint/typescript-estree": "8.3.0", + "@typescript-eslint/utils": "8.3.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -22651,10 +22655,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.2.0.tgz", - "integrity": "sha512-6a9QSK396YqmiBKPkJtxsgZZZVjYQ6wQ/TlI0C65z7vInaETuC6HAHD98AGLC8DyIPqHytvNuS8bBVvNLKyqvQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz", + "integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -22664,15 +22669,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.2.0.tgz", - "integrity": "sha512-kiG4EDUT4dImplOsbh47B1QnNmXSoUqOjWDvCJw/o8LgfD0yr7k2uy54D5Wm0j4t71Ge1NkynGhpWdS0dEIAUA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz", + "integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.2.0", - "@typescript-eslint/visitor-keys": "8.2.0", + "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/visitor-keys": "8.3.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", @@ -22696,6 +22702,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -22707,15 +22714,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.2.0.tgz", - "integrity": "sha512-O46eaYKDlV3TvAVDNcoDzd5N550ckSe8G4phko++OCSC1dYIb9LTc3HDGYdWqWIAT5qDUKphO6sd9RrpIJJPfg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz", + "integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.2.0", - "@typescript-eslint/types": "8.2.0", - "@typescript-eslint/typescript-estree": "8.2.0" + "@typescript-eslint/scope-manager": "8.3.0", + "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/typescript-estree": "8.3.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -22729,12 +22737,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.2.0.tgz", - "integrity": "sha512-sbgsPMW9yLvS7IhCi8IpuK1oBmtbWUNP+hBdwl/I9nzqVsszGnNGti5r9dUtF5RLivHUFFIdRvLiTsPhzSyJ3Q==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz", + "integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.2.0", + "@typescript-eslint/types": "8.3.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -23203,15 +23212,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.filter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.4.tgz", @@ -26569,26 +26569,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/google-auth-library": { "version": "9.14.0", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.0.tgz", @@ -34605,15 +34585,6 @@ "node": ">=8" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", diff --git a/package.json b/package.json index a8d3fd04..70d0bb5e 100644 --- a/package.json +++ b/package.json @@ -77,13 +77,13 @@ "@adobe/helix-universal": "5.0.5", "@adobe/semantic-release-coralogix": "1.1.31", "@adobe/semantic-release-skms-cmr": "1.1.2", - "@redocly/cli": "1.21.0", + "@redocly/cli": "1.22.1", "@semantic-release/changelog": "6.0.3", "@semantic-release/exec": "6.0.3", "@semantic-release/git": "10.0.1", "@semantic-release/npm": "12.0.1", - "@typescript-eslint/eslint-plugin": "8.2.0", - "@typescript-eslint/parser": "8.2.0", + "@typescript-eslint/eslint-plugin": "8.3.0", + "@typescript-eslint/parser": "8.3.0", "c8": "10.1.2", "chai": "5.1.1", "chai-as-promised": "8.0.0", From 1ac8123b08d8e2fbb62c10addf9893ba3124019c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ekrem=20Do=C4=9Fan?= Date: Mon, 2 Sep 2024 13:23:08 +0200 Subject: [PATCH 11/26] fix(cwv): audit url calculating for rum bundler API (#386) * fix(cwv): error handling * fix(cwv): audit url handling --- src/cwv/handler.js | 13 +++++++++++-- test/audits/cwv.test.js | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/cwv/handler.js b/src/cwv/handler.js index 78d255b3..2034eb04 100644 --- a/src/cwv/handler.js +++ b/src/cwv/handler.js @@ -11,17 +11,25 @@ */ import RUMAPIClient from '@adobe/spacecat-shared-rum-api-client'; +import URI from 'urijs'; +import { hasText } from '@adobe/spacecat-shared-utils'; import { getRUMDomainkey } from '../support/utils.js'; import { AuditBuilder } from '../common/audit-builder.js'; const DAILY_THRESHOLD = 1000; const INTERVAL = 7; // days +export function getAuditUrl(baseURL) { + const uri = new URI(baseURL); + return hasText(uri.subdomain()) ? baseURL.replace(/https?:\/\//, '') : baseURL.replace(/https?:\/\//, 'www.'); +} + export async function CWVRunner(auditUrl, context, site) { const rumAPIClient = RUMAPIClient.createFrom(context); const domainkey = await getRUMDomainkey(site.getBaseURL(), context); + const finalUrl = getAuditUrl(auditUrl); const options = { - domain: auditUrl, + domain: finalUrl, domainkey, interval: INTERVAL, granularity: 'hourly', @@ -36,10 +44,11 @@ export async function CWVRunner(auditUrl, context, site) { return { auditResult, - fullAuditRef: auditUrl, + fullAuditRef: finalUrl, }; } export default new AuditBuilder() + .withUrlResolver((site) => site.getBaseURL()) .withRunner(CWVRunner) .build(); diff --git a/test/audits/cwv.test.js b/test/audits/cwv.test.js index 28080c1c..664cef80 100644 --- a/test/audits/cwv.test.js +++ b/test/audits/cwv.test.js @@ -17,7 +17,7 @@ import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import nock from 'nock'; import { createSite } from '@adobe/spacecat-shared-data-access/src/models/site.js'; -import { CWVRunner } from '../../src/cwv/handler.js'; +import { CWVRunner, getAuditUrl } from '../../src/cwv/handler.js'; import { rumData } from '../fixtures/rum-data.js'; use(sinonChai); @@ -59,7 +59,7 @@ describe('Index Tests', () => { }); it('cwv audit runs rum api client cwv query', async () => { - const result = await CWVRunner('www.spacecat.com', context, site); + const result = await CWVRunner('https://spacecat.com', context, site); expect(result).to.deep.equal({ auditResult: { cwv: rumData.filter((data) => data.pageviews >= 7000), @@ -70,4 +70,13 @@ describe('Index Tests', () => { fullAuditRef: auditUrl, }); }); + + it('audit url calculated correctly', async () => { + expect(getAuditUrl('http://spacecat.com')).to.equal('www.spacecat.com'); + expect(getAuditUrl('https://spacecat.com')).to.equal('www.spacecat.com'); + expect(getAuditUrl('http://www.spacecat.com')).to.equal('www.spacecat.com'); + expect(getAuditUrl('https://www.spacecat.com')).to.equal('www.spacecat.com'); + expect(getAuditUrl('http://blog.spacecat.com')).to.equal('blog.spacecat.com'); + expect(getAuditUrl('https://blog.spacecat.com')).to.equal('blog.spacecat.com'); + }); }); From e91b549d3f68a429f62a56b60f1c78cacf51f854 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 2 Sep 2024 11:25:20 +0000 Subject: [PATCH 12/26] chore(release): 1.29.2 [skip ci] ## [1.29.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.1...v1.29.2) (2024-09-02) ### Bug Fixes * **cwv:** audit url calculating for rum bundler API ([#386](https://github.com/adobe/spacecat-audit-worker/issues/386)) ([1ac8123](https://github.com/adobe/spacecat-audit-worker/commit/1ac8123b08d8e2fbb62c10addf9893ba3124019c)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99cc319a..f347bb6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.29.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.1...v1.29.2) (2024-09-02) + + +### Bug Fixes + +* **cwv:** audit url calculating for rum bundler API ([#386](https://github.com/adobe/spacecat-audit-worker/issues/386)) ([1ac8123](https://github.com/adobe/spacecat-audit-worker/commit/1ac8123b08d8e2fbb62c10addf9893ba3124019c)) + ## [1.29.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.0...v1.29.1) (2024-08-28) diff --git a/package-lock.json b/package-lock.json index 74385f51..ddebdc08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.1", + "version": "1.29.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.1", + "version": "1.29.2", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 70d0bb5e..5b7a7fe4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.1", + "version": "1.29.2", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From b55e4fb993a7d3f782e4e2109ce63c46e2df74bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:57:34 +0000 Subject: [PATCH 13/26] fix(deps): update dependency @adobe/spacecat-shared-rum-api-client to v2.9.0 (#388) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 18 ++++++++++-------- package.json | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ddebdc08..bdb16095 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", - "@adobe/spacecat-shared-rum-api-client": "2.8.0", + "@adobe/spacecat-shared-rum-api-client": "2.9.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", "@adobe/spacecat-shared-utils": "1.19.6", "@aws-sdk/client-lambda": "3.637.0", @@ -5548,15 +5548,16 @@ } }, "node_modules/@adobe/spacecat-shared-rum-api-client": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-rum-api-client/-/spacecat-shared-rum-api-client-2.8.0.tgz", - "integrity": "sha512-CNtQy6nYWErCJgG2YyFxej8hVBnoS8PItPNLvHRjEYXFpU9QhuoS+bSxcmDRbwRxMbHpAgK3XclddP6DFrKjDQ==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-rum-api-client/-/spacecat-shared-rum-api-client-2.9.0.tgz", + "integrity": "sha512-VbtFFeQP/+/DJ9W+z09oMqLQfbGizmInScKv1xJs9di8lXRQislKofR/rC8Aak2Bu0d4odfdhjyywpxwLBggBg==", + "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", "@adobe/helix-shared-wrap": "2.0.2", "@adobe/helix-universal": "5.0.5", "@adobe/spacecat-shared-utils": "1.4.0", - "aws4": "1.13.1", + "aws4": "1.13.2", "d3-array": "3.2.4", "urijs": "^1.19.11" }, @@ -5663,9 +5664,10 @@ "license": "Apache-2.0" }, "node_modules/@adobe/spacecat-shared-rum-api-client/node_modules/aws4": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.1.tgz", - "integrity": "sha512-u5w79Rd7SU4JaIlA/zFqG+gOiuq25q5VLyZ8E+ijJeILuTxVzZgp2CaGw/UTw6pXYN9XMO9yiqj/nEHmhTG5CA==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" }, "node_modules/@adobe/spacecat-shared-utils": { "version": "1.19.6", diff --git a/package.json b/package.json index 5b7a7fe4..e768618d 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", - "@adobe/spacecat-shared-rum-api-client": "2.8.0", + "@adobe/spacecat-shared-rum-api-client": "2.9.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", "@aws-sdk/client-lambda": "3.637.0", "@aws-sdk/credential-provider-node": "3.637.0", From c79e6b3051944281ee8a2028b4631109f5a43b63 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 3 Sep 2024 09:59:48 +0000 Subject: [PATCH 14/26] chore(release): 1.29.3 [skip ci] ## [1.29.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.29.3) (2024-09-03) ### Bug Fixes * **deps:** update dependency @adobe/spacecat-shared-rum-api-client to v2.9.0 ([#388](https://github.com/adobe/spacecat-audit-worker/issues/388)) ([b55e4fb](https://github.com/adobe/spacecat-audit-worker/commit/b55e4fb993a7d3f782e4e2109ce63c46e2df74bf)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f347bb6b..b2931406 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.29.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.29.3) (2024-09-03) + + +### Bug Fixes + +* **deps:** update dependency @adobe/spacecat-shared-rum-api-client to v2.9.0 ([#388](https://github.com/adobe/spacecat-audit-worker/issues/388)) ([b55e4fb](https://github.com/adobe/spacecat-audit-worker/commit/b55e4fb993a7d3f782e4e2109ce63c46e2df74bf)) + ## [1.29.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.1...v1.29.2) (2024-09-02) diff --git a/package-lock.json b/package-lock.json index bdb16095..347b8d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.2", + "version": "1.29.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.2", + "version": "1.29.3", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index e768618d..c3289478 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.2", + "version": "1.29.3", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 33aa0257031ddc92c47718aaf100a30cf7662a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ekrem=20Do=C4=9Fan?= Date: Tue, 3 Sep 2024 15:38:09 +0200 Subject: [PATCH 15/26] feat: high bounce rate and low ctr opportunities (#384) * feat: high bounce rate and low ctr opportunities * feat: high bounce rate and low ctr opportunities * fix(exp-opportunities): bump the rumapi client version and rename the audit * fix(exp-opportunities): centralize wwwUrlResolver * fix(exp-opportunities): package-lock.json --- package-lock.json | 18 +-------- src/common/audit.js | 9 ++++- src/cwv/handler.js | 15 ++----- .../experimentation-opportunities.js} | 40 ++++++++----------- src/index.js | 10 ++--- test/audits/cwv.test.js | 13 +----- ... => experimentation-opportunities.test.js} | 27 +++++++------ test/common/audit.test.js | 16 +++++++- test/fixtures/opportunitiesdata.json | 22 +++++++++- 9 files changed, 87 insertions(+), 83 deletions(-) rename src/{opportunities/opportunities.js => experimentation-opportunities/experimentation-opportunities.js} (56%) rename test/audits/{opportunities.test.js => experimentation-opportunities.test.js} (84%) diff --git a/package-lock.json b/package-lock.json index 347b8d83..7a723a58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5551,7 +5551,6 @@ "version": "2.9.0", "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-rum-api-client/-/spacecat-shared-rum-api-client-2.9.0.tgz", "integrity": "sha512-VbtFFeQP/+/DJ9W+z09oMqLQfbGizmInScKv1xJs9di8lXRQislKofR/rC8Aak2Bu0d4odfdhjyywpxwLBggBg==", - "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", "@adobe/helix-shared-wrap": "2.0.2", @@ -5666,8 +5665,7 @@ "node_modules/@adobe/spacecat-shared-rum-api-client/node_modules/aws4": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "license": "MIT" + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" }, "node_modules/@adobe/spacecat-shared-utils": { "version": "1.19.6", @@ -20369,7 +20367,6 @@ "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.22.1.tgz", "integrity": "sha512-fGBj3KH32JH9Kg4Y3DQ2iF5jfpjT7T5ypA3JOpJcwGZTI/krDzrSxOb7ArX0HCATCBCobkWzDynHBF03j9oPvw==", "dev": true, - "license": "MIT", "dependencies": { "@redocly/openapi-core": "1.22.1", "abort-controller": "^3.0.0", @@ -20538,15 +20535,13 @@ "version": "0.10.1", "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.10.1.tgz", "integrity": "sha512-H3LnKVGzOaxskwJu8pmJYwBOWjP61qOK7TuTrbafqArDVckE06fhA6l0nO4KvBbjLPjy1Al7UnlxOu23V4Nl0w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/@redocly/openapi-core": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.22.1.tgz", "integrity": "sha512-pjr456gJzrbwPvBjFKlWOd9nZEcr/dp6XSH0c8ijWGWv5K+V0vpUUy2zaTAVsFAoCydx1miEoOcbLhWQ9WC2nw==", "dev": true, - "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.0", "@redocly/config": "^0.10.1", @@ -22555,7 +22550,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz", "integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.3.0", @@ -22589,7 +22583,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz", "integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "8.3.0", "@typescript-eslint/types": "8.3.0", @@ -22618,7 +22611,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz", "integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.3.0", "@typescript-eslint/visitor-keys": "8.3.0" @@ -22636,7 +22628,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz", "integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "8.3.0", "@typescript-eslint/utils": "8.3.0", @@ -22661,7 +22652,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz", "integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -22675,7 +22665,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz", "integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "8.3.0", "@typescript-eslint/visitor-keys": "8.3.0", @@ -22704,7 +22693,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -22720,7 +22708,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz", "integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@typescript-eslint/scope-manager": "8.3.0", @@ -22743,7 +22730,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz", "integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.3.0", "eslint-visitor-keys": "^3.4.3" diff --git a/src/common/audit.js b/src/common/audit.js index 546f0ecf..fbc21e41 100644 --- a/src/common/audit.js +++ b/src/common/audit.js @@ -10,8 +10,9 @@ * governing permissions and limitations under the License. */ -import { composeAuditURL } from '@adobe/spacecat-shared-utils'; +import { composeAuditURL, hasText } from '@adobe/spacecat-shared-utils'; import { ok } from '@adobe/spacecat-shared-http-utils'; +import URI from 'urijs'; import { retrieveSiteBySiteId } from '../utils/data-access.js'; export async function defaultMessageSender(resultMessage, context) { @@ -52,6 +53,12 @@ export async function defaultUrlResolver(site) { return composeAuditURL(site.getBaseURL()); } +export function wwwUrlResolver(site) { + const baseURL = site.getBaseURL(); + const uri = new URI(baseURL); + return hasText(uri.subdomain()) ? baseURL.replace(/https?:\/\//, '') : baseURL.replace(/https?:\/\//, 'www.'); +} + export async function noopUrlResolver(site) { return site.getBaseURL(); } diff --git a/src/cwv/handler.js b/src/cwv/handler.js index 2034eb04..3d6be775 100644 --- a/src/cwv/handler.js +++ b/src/cwv/handler.js @@ -11,25 +11,18 @@ */ import RUMAPIClient from '@adobe/spacecat-shared-rum-api-client'; -import URI from 'urijs'; -import { hasText } from '@adobe/spacecat-shared-utils'; import { getRUMDomainkey } from '../support/utils.js'; import { AuditBuilder } from '../common/audit-builder.js'; +import { wwwUrlResolver } from '../common/audit.js'; const DAILY_THRESHOLD = 1000; const INTERVAL = 7; // days -export function getAuditUrl(baseURL) { - const uri = new URI(baseURL); - return hasText(uri.subdomain()) ? baseURL.replace(/https?:\/\//, '') : baseURL.replace(/https?:\/\//, 'www.'); -} - export async function CWVRunner(auditUrl, context, site) { const rumAPIClient = RUMAPIClient.createFrom(context); const domainkey = await getRUMDomainkey(site.getBaseURL(), context); - const finalUrl = getAuditUrl(auditUrl); const options = { - domain: finalUrl, + domain: auditUrl, domainkey, interval: INTERVAL, granularity: 'hourly', @@ -44,11 +37,11 @@ export async function CWVRunner(auditUrl, context, site) { return { auditResult, - fullAuditRef: finalUrl, + fullAuditRef: auditUrl, }; } export default new AuditBuilder() - .withUrlResolver((site) => site.getBaseURL()) + .withUrlResolver(wwwUrlResolver) .withRunner(CWVRunner) .build(); diff --git a/src/opportunities/opportunities.js b/src/experimentation-opportunities/experimentation-opportunities.js similarity index 56% rename from src/opportunities/opportunities.js rename to src/experimentation-opportunities/experimentation-opportunities.js index 4eff2b43..2c44b31e 100644 --- a/src/opportunities/opportunities.js +++ b/src/experimentation-opportunities/experimentation-opportunities.js @@ -10,14 +10,17 @@ * governing permissions and limitations under the License. */ -/* c8 ignore start */ import RUMAPIClient from '@adobe/spacecat-shared-rum-api-client'; import { AuditBuilder } from '../common/audit-builder.js'; import { getRUMDomainkey } from '../support/utils.js'; +import { wwwUrlResolver } from '../common/audit.js'; const DAYS = 30; - -let log = console; +const OPPTY_QUERIES = [ + 'rageclick', + 'high-inorganic-high-bounce-rate', + 'high-organic-low-ctr', +]; /** * Audit handler container for all the opportunities @@ -27,10 +30,8 @@ let log = console; * @returns */ -export async function opportunitiesHandler(auditUrl, context, site) { - log = context.log; - log.info(`Received Opportunities audit request for ${auditUrl}`); - const startTime = process.hrtime(); +export async function handler(auditUrl, context, site) { + const { log } = context; const rumAPIClient = RUMAPIClient.createFrom(context); const domainkey = await getRUMDomainkey(site.getBaseURL(), context); @@ -40,30 +41,21 @@ export async function opportunitiesHandler(auditUrl, context, site) { interval: DAYS, granularity: 'hourly', }; - const experimentationHandlers = ['rageclick']; - const queryResults = await rumAPIClient.queryMulti(experimentationHandlers, options); - const auditData = { - experimentationOpportunities: [], - }; - for (const queryResult of Object.keys(queryResults)) { - if (experimentationHandlers.includes(queryResult)) { - auditData.experimentationOpportunities.push(...queryResults[queryResult]); - } - } - const endTime = process.hrtime(startTime); - const elapsedSeconds = endTime[0] + endTime[1] / 1e9; - const formattedElapsed = elapsedSeconds.toFixed(2); + const queryResults = await rumAPIClient.queryMulti(OPPTY_QUERIES, options); + const experimentationOpportunities = Object.values(queryResults).flatMap((oppty) => oppty); - log.info(`Opportunities Audit is completed in ${formattedElapsed} seconds for ${auditUrl}`); + log.info(`Found ${experimentationOpportunities.length} many experimentation opportunites for ${auditUrl}`); return { - auditResult: auditData, + auditResult: { + experimentationOpportunities, + }, fullAuditRef: auditUrl, }; } export default new AuditBuilder() - .withRunner(opportunitiesHandler) + .withRunner(handler) + .withUrlResolver(wwwUrlResolver) .build(); -/* c8 ignore stop */ diff --git a/src/index.js b/src/index.js index a99c7086..19b7cfd2 100644 --- a/src/index.js +++ b/src/index.js @@ -29,7 +29,7 @@ import experimentation from './experimentation/handler.js'; import conversion from './conversion/handler.js'; import essExperimentationDaily from './experimentation-ess/daily.js'; import essExperimentationAll from './experimentation-ess/all.js'; -import opportunities from './opportunities/opportunities.js'; +import experimentationOpportunities from './experimentation-opportunities/experimentation-opportunities.js'; import costs from './costs/handler.js'; import structuredData from './structured-data/handler.js'; @@ -46,7 +46,7 @@ const HANDLERS = { conversion, 'experimentation-ess-daily': essExperimentationDaily, 'experimentation-ess-all': essExperimentationAll, - opportunities, + 'experimentation-opportunities': experimentationOpportunities, costs, 'structured-data': structuredData, dummy: (message) => ok(message), @@ -68,7 +68,7 @@ async function run(message, context) { const { log } = context; const { type, url } = message; - log.info(`Audit req received for url: ${url}`); + log.info(`Received ${type} audit request for: ${url}`); const handler = HANDLERS[type]; if (!handler) { @@ -82,11 +82,11 @@ async function run(message, context) { try { const result = await (typeof handler.run === 'function' ? handler.run(message, context) : handler(message, context)); - log.info(`Audit for ${type} completed in ${getElapsedSeconds(startTime)} seconds`); + log.info(`${type} audit for ${url} completed in ${getElapsedSeconds(startTime)} seconds`); return result; } catch (e) { - log.error(`Audit failed after ${getElapsedSeconds(startTime)} seconds`, e); + log.error(`${type} audit for ${url} failed after ${getElapsedSeconds(startTime)} seconds`, e); return internalServerError(); } } diff --git a/test/audits/cwv.test.js b/test/audits/cwv.test.js index 664cef80..28080c1c 100644 --- a/test/audits/cwv.test.js +++ b/test/audits/cwv.test.js @@ -17,7 +17,7 @@ import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import nock from 'nock'; import { createSite } from '@adobe/spacecat-shared-data-access/src/models/site.js'; -import { CWVRunner, getAuditUrl } from '../../src/cwv/handler.js'; +import { CWVRunner } from '../../src/cwv/handler.js'; import { rumData } from '../fixtures/rum-data.js'; use(sinonChai); @@ -59,7 +59,7 @@ describe('Index Tests', () => { }); it('cwv audit runs rum api client cwv query', async () => { - const result = await CWVRunner('https://spacecat.com', context, site); + const result = await CWVRunner('www.spacecat.com', context, site); expect(result).to.deep.equal({ auditResult: { cwv: rumData.filter((data) => data.pageviews >= 7000), @@ -70,13 +70,4 @@ describe('Index Tests', () => { fullAuditRef: auditUrl, }); }); - - it('audit url calculated correctly', async () => { - expect(getAuditUrl('http://spacecat.com')).to.equal('www.spacecat.com'); - expect(getAuditUrl('https://spacecat.com')).to.equal('www.spacecat.com'); - expect(getAuditUrl('http://www.spacecat.com')).to.equal('www.spacecat.com'); - expect(getAuditUrl('https://www.spacecat.com')).to.equal('www.spacecat.com'); - expect(getAuditUrl('http://blog.spacecat.com')).to.equal('blog.spacecat.com'); - expect(getAuditUrl('https://blog.spacecat.com')).to.equal('blog.spacecat.com'); - }); }); diff --git a/test/audits/opportunities.test.js b/test/audits/experimentation-opportunities.test.js similarity index 84% rename from test/audits/opportunities.test.js rename to test/audits/experimentation-opportunities.test.js index 22905dfb..dfd17478 100644 --- a/test/audits/opportunities.test.js +++ b/test/audits/experimentation-opportunities.test.js @@ -16,7 +16,7 @@ import { expect, use } from 'chai'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import nock from 'nock'; -import { opportunitiesHandler } from '../../src/opportunities/opportunities.js'; +import { handler } from '../../src/experimentation-opportunities/experimentation-opportunities.js'; import { MockContextBuilder } from '../shared.js'; import opportunitiesData from '../fixtures/opportunitiesdata.json' assert { type: 'json' }; @@ -91,19 +91,22 @@ describe('Opportunities Tests', () => { const site = { getBaseURL: () => 'https://abc.com', }; - const auditData = await opportunitiesHandler(url, context, site); + const auditData = await handler(url, context, site); - expect(context.rumApiClient.queryMulti).calledWith( - ['rageclick'], - { - domain: 'https://abc.com', - domainkey: 'abc_dummy_key', - interval: 30, - granularity: 'hourly', - }, - ); + const expected = Object.values(opportunitiesData).flatMap((data) => data); + + expect(context.rumApiClient.queryMulti).calledWith([ + 'rageclick', + 'high-inorganic-high-bounce-rate', + 'high-organic-low-ctr', + ], { + domain: 'https://abc.com', + domainkey: 'abc_dummy_key', + interval: 30, + granularity: 'hourly', + }); expect( auditData.auditResult.experimentationOpportunities, - ).to.deep.equal(opportunitiesData.rageclick); + ).to.deep.equal(expected); }); }); diff --git a/test/common/audit.test.js b/test/common/audit.test.js index a3078ab4..d1296366 100644 --- a/test/common/audit.test.js +++ b/test/common/audit.test.js @@ -21,10 +21,13 @@ import { createOrganization } from '@adobe/spacecat-shared-data-access/src/model import { createConfiguration } from '@adobe/spacecat-shared-data-access/src/models/configuration.js'; import { composeAuditURL, prependSchema } from '@adobe/spacecat-shared-utils'; import { - defaultMessageSender, defaultOrgProvider, + defaultMessageSender, + defaultOrgProvider, defaultPersister, defaultSiteProvider, - defaultUrlResolver, noopUrlResolver, + defaultUrlResolver, + noopUrlResolver, + wwwUrlResolver, } from '../../src/common/audit.js'; import { AuditBuilder } from '../../src/common/audit-builder.js'; import { MockContextBuilder } from '../shared.js'; @@ -326,4 +329,13 @@ describe('Audit tests', () => { expect(context.sqs.sendMessage).to.have.been.calledOnce; expect(context.sqs.sendMessage).to.have.been.calledWith(queueUrl, expectedMessage); }); + + it('wwwUrlResolver calculates audit urls correctly', async () => { + expect(wwwUrlResolver(createSite({ baseURL: 'http://spacecat.com' }))).to.equal('www.spacecat.com'); + expect(wwwUrlResolver(createSite({ baseURL: 'https://spacecat.com' }))).to.equal('www.spacecat.com'); + expect(wwwUrlResolver(createSite({ baseURL: 'http://www.spacecat.com' }))).to.equal('www.spacecat.com'); + expect(wwwUrlResolver(createSite({ baseURL: 'https://www.spacecat.com' }))).to.equal('www.spacecat.com'); + expect(wwwUrlResolver(createSite({ baseURL: 'http://blog.spacecat.com' }))).to.equal('blog.spacecat.com'); + expect(wwwUrlResolver(createSite({ baseURL: 'https://blog.spacecat.com' }))).to.equal('blog.spacecat.com'); + }); }); diff --git a/test/fixtures/opportunitiesdata.json b/test/fixtures/opportunitiesdata.json index fde23dbf..f738a5ec 100644 --- a/test/fixtures/opportunitiesdata.json +++ b/test/fixtures/opportunitiesdata.json @@ -61,5 +61,25 @@ } ] } - ] + ], + "high-organic-low-ctr": [{ + "type": "high-organic-low-ctr", + "page": "https://abc.com/abc-adoption/account", + "screenshot": "", + "trackedPageKPIName": "Click Through Rate", + "trackedPageKPIValue": "0.14", + "pageViews": 2145, + "samples": 123, + "metrics": [] + }], + "high-inorganic-high-bounce-rate": [{ + "type": "high-inorganic-high-bounce-rate", + "page": "https://abc.com/abc-adoption/pricing", + "screenshot": "", + "trackedPageKPIName": "Bounce Rate", + "trackedPageKPIValue": 0.76, + "pageViews": 8839, + "samples": 89, + "metrics": [] + }] } From 158f44ea9602f27bd095748c37d7a6267e56a820 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 3 Sep 2024 13:40:14 +0000 Subject: [PATCH 16/26] chore(release): 1.30.0 [skip ci] # [1.30.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.30.0) (2024-09-03) ### Bug Fixes * **deps:** update dependency @adobe/spacecat-shared-rum-api-client to v2.9.0 ([#388](https://github.com/adobe/spacecat-audit-worker/issues/388)) ([b55e4fb](https://github.com/adobe/spacecat-audit-worker/commit/b55e4fb993a7d3f782e4e2109ce63c46e2df74bf)) ### Features * high bounce rate and low ctr opportunities ([#384](https://github.com/adobe/spacecat-audit-worker/issues/384)) ([33aa025](https://github.com/adobe/spacecat-audit-worker/commit/33aa0257031ddc92c47718aaf100a30cf7662a61)) --- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2931406..68686368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [1.30.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.30.0) (2024-09-03) + + +### Bug Fixes + +* **deps:** update dependency @adobe/spacecat-shared-rum-api-client to v2.9.0 ([#388](https://github.com/adobe/spacecat-audit-worker/issues/388)) ([b55e4fb](https://github.com/adobe/spacecat-audit-worker/commit/b55e4fb993a7d3f782e4e2109ce63c46e2df74bf)) + + +### Features + +* high bounce rate and low ctr opportunities ([#384](https://github.com/adobe/spacecat-audit-worker/issues/384)) ([33aa025](https://github.com/adobe/spacecat-audit-worker/commit/33aa0257031ddc92c47718aaf100a30cf7662a61)) + ## [1.29.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.29.3) (2024-09-03) diff --git a/package-lock.json b/package-lock.json index 7a723a58..1a0bd23b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.3", + "version": "1.30.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.3", + "version": "1.30.0", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index c3289478..e7549f98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.29.3", + "version": "1.30.0", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 8fd4d07265d770eda7b4bae6f7c1177351a1cb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominique=20J=C3=A4ggi?= <1872195+solaris007@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:09:18 +0200 Subject: [PATCH 17/26] chore: migrate renovate secrets (#390) --- default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.json b/default.json index 107732fd..4fedbde2 100644 --- a/default.json +++ b/default.json @@ -48,6 +48,6 @@ } ], "encrypted": { - "npmToken": "wcFMA/xDdHCJBTolAQ//cBnUY2GbbFUjxEW/JyLas0ZYKaS9XCOrP4FA7r43SwRV44ynLM0XIWB+ceGUFrTN8YWfvkbbMVFcxqKYFnjl2l1S/8G9jvvS7bJLZCd1WNk7oVkIXnpb76FE6FQe0giudOiaWo21QVORVEoN/G6du3EOEiCghLMSCMtjg9+0M9Qg9dFJFoUeAHxLhGMjU3kQFO89ljYjaEYA4dvY2Id4pQOx2l0K2T70hSvGhrDGnDyGzOdA3rtz5as+/LgASvOOsTvn9JRndN9G1vnWqHR8xJBibPOqRyJ82IH+pe/+fRex/4Dr1HxlVa9BPhLslAFgUZqTrmwVhZutwURd5sRYNbYiMCBNNjmuVSfIIv+3/y4yEimaQWoh5RVGNxfYddryOSL/FKGeIybuKpskhzTzjtohvu71EjBinyx0qw/O92gZ+UHIZqhOWfmIoGV/pLPjGqkboXYjeQmSauVl8e9by1QXDiGmKe0T16UblNAhU+sQJdneFE4UBflK61jnReAUOsRVFvn9vuVrOuF8zwdXPs8xb7vuE77wUg9M/2N7I+y3tzVtb4uHvoVjtzIlkBe37xkzunKCDbk/Hdgk4lGdlFeTpQYL8Q/rU0itnYHZwfUThgPq1BhP+rWxj6Qkv1DR1983yowG9Zv54bO42oGO6apVAMZQ4q8Bz15BK0TCQFzSdAHRSJq9bALOc/HK5GbEQQ7sZ1JU76jjSFXqeBMZs7A2jrm1yNJAJ7WW+zLgXLjm9s1e1epn4PXerD50ypBKZnKfhmnnBB67IlO4IVfOLIllq3N1dJT2q5zqGdfgMN1qbyCg2JlgVSM8k83wwYtdLXC+mfl+" + "npmToken": "{{ secrets.NPM_TOKEN }}" } } From 78f6809d020b58c6b908f952c93a2db7de0f37c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominique=20J=C3=A4ggi?= <1872195+solaris007@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:27:29 +0200 Subject: [PATCH 18/26] chore: renove secrets remove (#391) --- default.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/default.json b/default.json index 4fedbde2..c889c400 100644 --- a/default.json +++ b/default.json @@ -46,8 +46,5 @@ "updateTypes": ["patch", "minor"], "automerge": true } - ], - "encrypted": { - "npmToken": "{{ secrets.NPM_TOKEN }}" - } + ] } From 6e684ffebf30ab4fdd633f2a4419c646675e80e7 Mon Sep 17 00:00:00 2001 From: Iulia Grumaz Date: Wed, 4 Sep 2024 15:40:38 +0300 Subject: [PATCH 19/26] fix(deps): update dependency @adobe/spacecat-shared-ahrefs-client to v1.5.2 (#394) include broken backlinks filter adjustment: do not limit to is do follow and is content --- package-lock.json | 9 ++++----- package.json | 2 +- test/audits/backlinks.test.js | 10 +++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a0bd23b..f54c94d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@adobe/helix-status": "10.1.2", "@adobe/helix-universal": "5.0.5", "@adobe/helix-universal-logger": "3.0.18", - "@adobe/spacecat-shared-ahrefs-client": "1.5.1", + "@adobe/spacecat-shared-ahrefs-client": "1.5.2", "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", @@ -1301,10 +1301,9 @@ } }, "node_modules/@adobe/spacecat-shared-ahrefs-client": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-ahrefs-client/-/spacecat-shared-ahrefs-client-1.5.1.tgz", - "integrity": "sha512-KnhCJ1qKFB65fpMLXY20oYk5oQzXSD3K0s0+D8aYYOrsnABFw0xzWlxKd3koKbLZekknjAU6gAqry9l6KlhybQ==", - "license": "Apache-2.0", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-ahrefs-client/-/spacecat-shared-ahrefs-client-1.5.2.tgz", + "integrity": "sha512-6n0j2im3ib11QcJLO3ROlBYXb6y066GEpvCc1xCoAZANqXl8M0hvVB1+Qyadh4g+sEU+VBtwvl6nCyVMqAuH6g==", "dependencies": { "@adobe/fetch": "4.1.8", "@adobe/helix-universal": "5.0.5", diff --git a/package.json b/package.json index e7549f98..591aa7dd 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@adobe/helix-status": "10.1.2", "@adobe/helix-universal": "5.0.5", "@adobe/helix-universal-logger": "3.0.18", - "@adobe/spacecat-shared-ahrefs-client": "1.5.1", + "@adobe/spacecat-shared-ahrefs-client": "1.5.2", "@adobe/spacecat-shared-data-access": "1.43.3", "@adobe/spacecat-shared-google-client": "1.2.2", "@adobe/spacecat-shared-http-utils": "1.6.8", diff --git a/test/audits/backlinks.test.js b/test/audits/backlinks.test.js index 5d43a4cb..e5f339fd 100644 --- a/test/audits/backlinks.test.js +++ b/test/audits/backlinks.test.js @@ -303,7 +303,7 @@ describe('Backlinks Tests', function () { auditResult: { finalUrl: 'bar.foo.com', brokenBacklinks: auditResult.backlinks, - fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22is_dofollow%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22is_content%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', }, }; @@ -343,7 +343,7 @@ describe('Backlinks Tests', function () { auditResult: { finalUrl: 'bar.foo.com', brokenBacklinks: auditResult.backlinks, - fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22is_dofollow%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22is_content%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', }, }; @@ -394,7 +394,7 @@ describe('Backlinks Tests', function () { auditResult: { finalUrl: 'bar.foo.com', brokenBacklinks: brokenBacklink.backlinks, - fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22is_dofollow%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22is_content%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=bar.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', }, }; const response = await auditBrokenBacklinks(message, context); @@ -432,7 +432,7 @@ describe('Backlinks Tests', function () { auditResult: { finalUrl: 'www.foo.com', brokenBacklinks: auditResult.backlinks, - fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=www.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22is_dofollow%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22is_content%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=www.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', }, }; @@ -498,7 +498,7 @@ describe('Backlinks Tests', function () { auditResult: { finalUrl: 'foo.com', brokenBacklinks: auditResult.backlinks.concat(brokenBacklinkWithTimeout), - fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22is_dofollow%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22is_content%22%2C%22is%22%3A%5B%22eq%22%2C1%5D%7D%2C%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', }, }; From 293c77841a3ba868fa7d3423f953880a33ae87cf Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 4 Sep 2024 12:42:55 +0000 Subject: [PATCH 20/26] chore(release): 1.30.1 [skip ci] ## [1.30.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.0...v1.30.1) (2024-09-04) ### Bug Fixes * **deps:** update dependency @adobe/spacecat-shared-ahrefs-client to v1.5.2 ([#394](https://github.com/adobe/spacecat-audit-worker/issues/394)) ([6e684ff](https://github.com/adobe/spacecat-audit-worker/commit/6e684ffebf30ab4fdd633f2a4419c646675e80e7)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68686368..46e61137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.30.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.0...v1.30.1) (2024-09-04) + + +### Bug Fixes + +* **deps:** update dependency @adobe/spacecat-shared-ahrefs-client to v1.5.2 ([#394](https://github.com/adobe/spacecat-audit-worker/issues/394)) ([6e684ff](https://github.com/adobe/spacecat-audit-worker/commit/6e684ffebf30ab4fdd633f2a4419c646675e80e7)) + # [1.30.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.29.2...v1.30.0) (2024-09-03) diff --git a/package-lock.json b/package-lock.json index f54c94d0..34eac8a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.0", + "version": "1.30.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.0", + "version": "1.30.1", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 591aa7dd..5c25786d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.0", + "version": "1.30.1", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 488a9a7fdcc248a8f49e30b211f6c36d3aa68091 Mon Sep 17 00:00:00 2001 From: rpapani <41927501+rpapani@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:14:15 -0700 Subject: [PATCH 21/26] fix(experimentation-ess): audit url calculating for rum bundler API (#389) --- src/experimentation-ess/all.js | 2 ++ src/experimentation-ess/daily.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/experimentation-ess/all.js b/src/experimentation-ess/all.js index b387afc8..8531914b 100644 --- a/src/experimentation-ess/all.js +++ b/src/experimentation-ess/all.js @@ -13,6 +13,7 @@ /* c8 ignore start */ import { AuditBuilder } from '../common/audit-builder.js'; import { processAudit, postProcessor } from './common.js'; +import { wwwUrlResolver } from '../common/audit.js'; const DAYS = 180; @@ -79,6 +80,7 @@ export async function essExperimentationAllAuditRunner(auditUrl, context, site) export default new AuditBuilder() .withRunner(essExperimentationAllAuditRunner) + .withUrlResolver(wwwUrlResolver) .withPostProcessors([postProcessor]) .withPersister(persistOnlyMetadata) .withMessageSender(() => true) diff --git a/src/experimentation-ess/daily.js b/src/experimentation-ess/daily.js index 8f94f441..5766a8b1 100644 --- a/src/experimentation-ess/daily.js +++ b/src/experimentation-ess/daily.js @@ -13,6 +13,7 @@ /* c8 ignore start */ import { AuditBuilder } from '../common/audit-builder.js'; import { processAudit } from './common.js'; +import { wwwUrlResolver } from '../common/audit.js'; const DAYS = 1; @@ -44,5 +45,6 @@ export async function essExperimentationDailyAuditRunner(auditUrl, context, site export default new AuditBuilder() .withRunner(essExperimentationDailyAuditRunner) + .withUrlResolver(wwwUrlResolver) .build(); /* c8 ignore stop */ From f3fec7770cd3cb2884c8d2ac37bb6942dfa3e96f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 4 Sep 2024 16:16:16 +0000 Subject: [PATCH 22/26] chore(release): 1.30.2 [skip ci] ## [1.30.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.1...v1.30.2) (2024-09-04) ### Bug Fixes * **experimentation-ess:** audit url calculating for rum bundler API ([#389](https://github.com/adobe/spacecat-audit-worker/issues/389)) ([488a9a7](https://github.com/adobe/spacecat-audit-worker/commit/488a9a7fdcc248a8f49e30b211f6c36d3aa68091)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e61137..3610753e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.30.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.1...v1.30.2) (2024-09-04) + + +### Bug Fixes + +* **experimentation-ess:** audit url calculating for rum bundler API ([#389](https://github.com/adobe/spacecat-audit-worker/issues/389)) ([488a9a7](https://github.com/adobe/spacecat-audit-worker/commit/488a9a7fdcc248a8f49e30b211f6c36d3aa68091)) + ## [1.30.1](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.0...v1.30.1) (2024-09-04) diff --git a/package-lock.json b/package-lock.json index 34eac8a3..08ab8fe7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.1", + "version": "1.30.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.1", + "version": "1.30.2", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 5c25786d..94f65b77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.1", + "version": "1.30.2", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From e92d4cd9223d35f959a000134e1660c6b2d15a21 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:13:49 +0000 Subject: [PATCH 23/26] fix(deps): update dependency @adobe/spacecat-shared-google-client to v1.2.3 (#395) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 82 ++++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 72 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08ab8fe7..dffcccc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@adobe/helix-universal-logger": "3.0.18", "@adobe/spacecat-shared-ahrefs-client": "1.5.2", "@adobe/spacecat-shared-data-access": "1.43.3", - "@adobe/spacecat-shared-google-client": "1.2.2", + "@adobe/spacecat-shared-google-client": "1.2.3", "@adobe/spacecat-shared-http-utils": "1.6.8", "@adobe/spacecat-shared-rum-api-client": "2.9.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", @@ -2663,9 +2663,10 @@ } }, "node_modules/@adobe/spacecat-shared-google-client": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-google-client/-/spacecat-shared-google-client-1.2.2.tgz", - "integrity": "sha512-vsJXEDW/0NWMr32BpHXfefAebyzbXNqzi+iFQHaEuI4f46CpwhfwHq4YmqK4VNgHfEZ7CZ8ugndMkl0UAr7a8g==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-google-client/-/spacecat-shared-google-client-1.2.3.tgz", + "integrity": "sha512-ZBwyUNU6vqolk1/me7y4Y5By7Sw1n1W7pQzCQmA7f4cmxI4hurOO31n9cQFzsNKYwj6Cz7SMDEJRT43HOtr1Tg==", + "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", "@adobe/helix-universal": "5.0.5", @@ -2673,7 +2674,7 @@ "@adobe/spacecat-shared-utils": "1.15.1", "@aws-sdk/client-secrets-manager": "3.637.0", "google-auth-library": "9.14.0", - "googleapis": "142.0.0" + "googleapis": "144.0.0" }, "engines": { "node": "^20.0.0 <21.0.0", @@ -2684,6 +2685,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-http-utils/-/spacecat-shared-http-utils-1.1.4.tgz", "integrity": "sha512-bG45mBhgH5MkSMDwZBNrFGs3fmMDxvmCiJVJk4r9zTaixwtoK69y5hu2pay+Z6WicE6CrEDBoOzfXjc47Wi5WQ==", + "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.2" } @@ -2692,6 +2694,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.1.2.tgz", "integrity": "sha512-O7yA/NgQGkp/2SFOTrcSFOb91VMZH29QRE9dXev/K8xVJkIL1g1B8IqT2G8sRurgQw2CPBQ2H7GF/FHW/HBxKw==", + "license": "Apache-2.0", "dependencies": { "debug": "4.3.4", "http-cache-semantics": "4.1.1", @@ -2705,6 +2708,7 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-utils/-/spacecat-shared-utils-1.15.1.tgz", "integrity": "sha512-pXVCpo5IRvwPR47ENKAe8UIGF2gWpMtOPpuGDoWfzPL/FEeuqhPk32aTwdBHZuoc38KRtts95aBrHj8o8IQlsw==", + "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.2", "@aws-sdk/client-s3": "3.574.0", @@ -2716,6 +2720,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.1.2.tgz", "integrity": "sha512-O7yA/NgQGkp/2SFOTrcSFOb91VMZH29QRE9dXev/K8xVJkIL1g1B8IqT2G8sRurgQw2CPBQ2H7GF/FHW/HBxKw==", + "license": "Apache-2.0", "dependencies": { "debug": "4.3.4", "http-cache-semantics": "4.1.1", @@ -2729,6 +2734,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -2738,12 +2744,14 @@ "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32c": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -2753,12 +2761,14 @@ "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/crc32c/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/sha1-browser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/ie11-detection": "^3.0.0", "@aws-crypto/supports-web-crypto": "^3.0.0", @@ -2772,12 +2782,14 @@ "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-crypto/sha1-browser/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/@adobe/spacecat-shared-google-client/node_modules/@aws-sdk/client-s3": { "version": "3.574.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.574.0.tgz", "integrity": "sha512-198QLFeJEs3xgCkLcGD8r0IVCR+BTjXGbVpDYC0DCU7vWjINR8igwwnuA5kbCHDALXvWmkX5MVuAlDuawsUn6w==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha1-browser": "3.0.0", "@aws-crypto/sha256-browser": "3.0.0", @@ -2846,6 +2858,7 @@ "version": "3.574.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sqs/-/client-sqs-3.574.0.tgz", "integrity": "sha512-ktqfE2N30B3Tg996GqAuSdT8ur9NRA2cwxGtfBUq+aflUEmHPbdIbjwxibrJiDsuH2L53SDsNaGxyuMMj8SMfA==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -2899,6 +2912,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.572.0.tgz", "integrity": "sha512-S+xhScao5MD79AkrcHmFpEDk+CgoiuB/31WFcTcnrTio5TOUONAaT0QyscOIwRp7BZ7Aez7TBM+loTteJ+TQvg==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -2947,6 +2961,7 @@ "version": "3.574.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.574.0.tgz", "integrity": "sha512-WcR8AnFhx7bqhYwfSl3OrF0Pu0LfHGgSOnmmORHqRF7ykguE09M/WUlCCjTGmZjJZ1we3uF5Xg8Jg12eiD+bmw==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -2997,6 +3012,7 @@ "version": "3.574.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.574.0.tgz", "integrity": "sha512-WNDSG9nipap/L1gGDkCQvU2u413HmVxMJKr41lBCibioz42Z4i6XkCr1etYwIjuVfGF6QPrsEsYLqRwlAC/BQg==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -3047,6 +3063,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.572.0.tgz", "integrity": "sha512-DBmf94qfN0dfaLl5EnNcq6TakWfOtVXYifHoTbX+VBwESj3rlY4W+W4mAnvBgAqDjlLFy7bBljmx+vnjnV73lg==", + "license": "Apache-2.0", "dependencies": { "@smithy/core": "^1.4.2", "@smithy/protocol-http": "^3.3.0", @@ -3064,6 +3081,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.568.0.tgz", "integrity": "sha512-MVTQoZwPnP1Ev5A7LG+KzeU6sCB8BcGkZeDT1z1V5Wt7GPq0MgFQTSSjhImnB9jqRSZkl1079Bt3PbO6lfIS8g==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/property-provider": "^2.2.0", @@ -3078,6 +3096,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.568.0.tgz", "integrity": "sha512-gL0NlyI2eW17hnCrh45hZV+qjtBquB+Bckiip9R6DIVRKqYcoILyiFhuOgf2bXeF23gVh6j18pvUvIoTaFWs5w==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/fetch-http-handler": "^2.5.0", @@ -3097,6 +3116,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.572.0.tgz", "integrity": "sha512-anlYZnpmVkfp9Gan+LcEkQvmRf/m0KcbR11th8sBEyI5lxMaHKXhnAtC/hEGT7e3L6rgNOrFYTPuSvllITD/Pg==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/credential-provider-env": "3.568.0", "@aws-sdk/credential-provider-http": "3.568.0", @@ -3119,6 +3139,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.572.0.tgz", "integrity": "sha512-S6C/S6xYesDakEuzYvlY1DMMKLtKQxdbbygq3hfeG2R0jUt9KpRLsQXK8qrBuVCKa3WcnjN/30hp4g/iUWFU/w==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", @@ -3170,6 +3191,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.572.0.tgz", "integrity": "sha512-jCQuH2qkbWoSY4wckLSfzf3OPh7zc7ZckEbIGGVUQar/JVff6EIbpQ+uNG29DDEOpdPPd8rrJsVuUlA/nvJdXA==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", @@ -3221,6 +3243,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.572.0.tgz", "integrity": "sha512-05KzbAp77fEiQXqMeodXeMbT83FOqSyBrfSEMz6U8uBXeJCy8zPUjN3acqcbG55/HNJHUvg1cftqzy+fUz71gA==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/credential-provider-env": "3.568.0", "@aws-sdk/credential-provider-process": "3.572.0", @@ -3244,6 +3267,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.572.0.tgz", "integrity": "sha512-hXcOytf0BadSm/MMy7MV8mmY0+Jv3mkavsHNBx0R82hw5ollD0I3JyOAaCtdUpztF0I72F8K+q8SpJQZ+EwArw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/property-provider": "^2.2.0", @@ -3259,6 +3283,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.572.0.tgz", "integrity": "sha512-iIlnpJiDXFp3XC4hJNSiNurnU24mr3iLB3HoNa9efr944bo6XBl9FQdk3NssIkqzSmgyoB2CEUx/daBHz4XSow==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/client-sso": "3.572.0", "@aws-sdk/token-providers": "3.572.0", @@ -3276,6 +3301,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.572.0.tgz", "integrity": "sha512-S6C/S6xYesDakEuzYvlY1DMMKLtKQxdbbygq3hfeG2R0jUt9KpRLsQXK8qrBuVCKa3WcnjN/30hp4g/iUWFU/w==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", @@ -3327,6 +3353,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.572.0.tgz", "integrity": "sha512-jCQuH2qkbWoSY4wckLSfzf3OPh7zc7ZckEbIGGVUQar/JVff6EIbpQ+uNG29DDEOpdPPd8rrJsVuUlA/nvJdXA==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", @@ -3378,6 +3405,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.572.0.tgz", "integrity": "sha512-IkSu8p32tQZhKqwmfLZLGfYwNhsS/HUQBLnDMHJlr9VifmDqlTurcr+DwMCaMimuFhcLeb45vqTymKf/ro/OBw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/property-provider": "^2.2.0", @@ -3396,6 +3424,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.568.0.tgz", "integrity": "sha512-ZJSmTmoIdg6WqAULjYzaJ3XcbgBzVy36lir6Y0UBMRGaxDgos1AARuX6EcYzXOl+ksLvxt/xMQ+3aYh1LWfKSw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/property-provider": "^2.2.0", @@ -3413,6 +3442,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.568.0.tgz", "integrity": "sha512-uc/nbSpXv64ct/wV3Ksz0/bXAsEtXuoZu5J9FTcFnM7c2MSofa0YQrtrJ8cG65uGbdeiFoJwPA048BTG/ilhCA==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@aws-sdk/util-arn-parser": "3.568.0", @@ -3430,6 +3460,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.572.0.tgz", "integrity": "sha512-+NKWVK295rOEANU/ohqEfNjkcEdZao7z6HxkMXX4gu4mDpSsVU8WhYr5hp5k3PUhtaiPU8M1rdfQBrZQc4uttw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/protocol-http": "^3.3.0", @@ -3444,6 +3475,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.572.0.tgz", "integrity": "sha512-ysblGDRn1yy8TlKUrwhnFbl3RuMfbVW1rbtePClEYpC/1u9MsqPmm/fmWJJGKat7NclnsgpQyfSQ64DCuaEedg==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "3.0.0", "@aws-crypto/crc32c": "3.0.0", @@ -3462,6 +3494,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.567.0.tgz", "integrity": "sha512-zQHHj2N3in9duKghH7AuRNrOMLnKhW6lnmb7dznou068DJtDr76w475sHp2TF0XELsOGENbbBsOlN/S5QBFBVQ==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/protocol-http": "^3.3.0", @@ -3476,6 +3509,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.567.0.tgz", "integrity": "sha512-XiGTH4VxrJ5fj6zeF6UL5U5EuJwLqj9bHW5pB+EKfw0pmbnyqfRdYNt46v4GsQql2iVOq1Z/Fiv754nIItBI/A==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/types": "^2.12.0", @@ -3489,6 +3523,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.568.0.tgz", "integrity": "sha512-BinH72RG7K3DHHC1/tCulocFv+ZlQ9SrPF9zYT0T1OT95JXuHhB7fH8gEABrc6DAtOdJJh2fgxQjPy5tzPtsrA==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/types": "^2.12.0", @@ -3502,6 +3537,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.567.0.tgz", "integrity": "sha512-rFk3QhdT4IL6O/UWHmNdjJiURutBCy+ogGqaNHf/RELxgXH3KmYorLwCe0eFb5hq8f6vr3zl4/iH7YtsUOuo1w==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/protocol-http": "^3.3.0", @@ -3516,6 +3552,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.572.0.tgz", "integrity": "sha512-ygQL1G2hWoJXkUGL/Xr5q9ojXCH8hgt/oKsxJtc5U8ZXw3SRlL6pCVE7+aiD0l8mgIGbW0vrL08Oc/jYWlakdw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@aws-sdk/util-arn-parser": "3.568.0", @@ -3535,6 +3572,7 @@ "version": "3.569.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sqs/-/middleware-sdk-sqs-3.569.0.tgz", "integrity": "sha512-KT3KlMmOApfOiMM0CdlO9RYCsjw7CmCpA3Fg2Jbe/+ywQNROMNthfgILqKq3ri7uTmWgo4yR4iaaTiRlrBfpAg==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/smithy-client": "^2.5.1", @@ -3551,6 +3589,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.572.0.tgz", "integrity": "sha512-/pEVgHnf8LsTG0hu9yqqvmLMknlKO5c19NM3J9qTWGLPfySi8tWrFuREAFKAxqJFgDw1IdFWd+dXIkodpbGwew==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/property-provider": "^2.2.0", @@ -3568,6 +3607,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.567.0.tgz", "integrity": "sha512-lhpBwFi3Tcw+jlOdaCsg3lCAg4oOSJB00bW/aLTFeZWutwi9VexMmsddZllx99lN+LDeCjryNyVd2TCRCKwYhQ==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/types": "^2.12.0", @@ -3581,6 +3621,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.572.0.tgz", "integrity": "sha512-R4bBbLp1ywtF1kJoOX1juDMztKPWeQHNj6XuTvtruFDn1RdfnBlbM3+9rguRfH5s4V+xfl8SSWchnyo2cI00xg==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@aws-sdk/util-endpoints": "3.572.0", @@ -3596,6 +3637,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.572.0.tgz", "integrity": "sha512-xkZMIxek44F4YW5r9otD1O5Y/kDkgAb6JNJePkP1qPVojrkCmin3OFYAOZgGm+T4DZAQ5rWhpaqTAWmnRumYfw==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/node-config-provider": "^2.3.0", @@ -3612,6 +3654,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.572.0.tgz", "integrity": "sha512-FD6FIi8py1ZAR53NjD2VXKDvvQUhhZu7CDUfC9gjAa7JDtv+rJvM9ZuoiQjaDnzzqYxTr4pKqqjLsd6+8BCSWA==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/middleware-sdk-s3": "3.572.0", "@aws-sdk/types": "3.567.0", @@ -3628,6 +3671,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.567.0.tgz", "integrity": "sha512-JBznu45cdgQb8+T/Zab7WpBmfEAh77gsk99xuF4biIb2Sw1mdseONdoGDjEJX57a25TzIv/WUJ2oABWumckz1A==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "tslib": "^2.6.2" @@ -3640,6 +3684,7 @@ "version": "3.572.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.572.0.tgz", "integrity": "sha512-AIEC7ItIWBqkJLtqcSd0HG8tvdh3zVwqnKPHNrcfFay0Xonqx3p/qTCDwGosh5CM5hDGzyOSRA5PkacEDBTz9w==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/types": "^2.12.0", @@ -3654,6 +3699,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.567.0.tgz", "integrity": "sha512-cqP0uXtZ7m7hRysf3fRyJwcY1jCgQTpJy7BHB5VpsE7DXlXHD5+Ur5L42CY7UrRPrB6lc6YGFqaAOs5ghMcLyA==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/types": "^2.12.0", @@ -3665,6 +3711,7 @@ "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.568.0.tgz", "integrity": "sha512-NVoZoLnKF+eXPBvXg+KqixgJkPSrerR6Gqmbjwqbv14Ini+0KNKB0/MXas1mDGvvEgtNkHI/Cb9zlJ3KXpti2A==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.567.0", "@smithy/node-config-provider": "^2.3.0", @@ -3687,6 +3734,7 @@ "version": "3.567.0", "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.567.0.tgz", "integrity": "sha512-Db25jK9sZdGa7PEQTdm60YauUVbeYGsSEMQOHGP6ifbXfCknqgkPgWV16DqAKJUsbII0xgkJ9LpppkmYal3K/g==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "tslib": "^2.6.2" @@ -3699,6 +3747,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.2.0.tgz", "integrity": "sha512-3GJNvRwXBGdkDZZOGiziVYzDpn4j6zfyULHMDKAGIUo72yHALpE9CbhfQp/XcLNVoc1byfMpn6uW5H2BqPjgaQ==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" } @@ -3707,6 +3756,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.2.0.tgz", "integrity": "sha512-VNB5+1oCgX3Fzs072yuRsUoC2N4Zg/LJ11DTxX3+Qu+Paa6AmbIF0E9sc2wthz9Psrk/zcOlTCyuposlIhPjZQ==", + "license": "Apache-2.0", "dependencies": { "@smithy/util-base64": "^2.3.0", "tslib": "^2.6.2" @@ -3716,6 +3766,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.4.2.tgz", "integrity": "sha512-2fek3I0KZHWJlRLvRTqxTEri+qV0GRHrJIoLFuBMZB4EMg4WgeBGfF0X6abnrNYpq55KJ6R4D6x4f0vLnhzinA==", + "license": "Apache-2.0", "dependencies": { "@smithy/middleware-endpoint": "^2.5.1", "@smithy/middleware-retry": "^2.3.1", @@ -3734,6 +3785,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "3.0.0", "@smithy/types": "^2.12.0", @@ -3745,6 +3797,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.2.0.tgz", "integrity": "sha512-UaPf8jKbcP71BGiO0CdeLmlg+RhWnlN8ipsMSdwvqBFigl5nil3rHOI/5GE3tfiuX8LvY5Z9N0meuU7Rab7jWw==", + "license": "Apache-2.0", "dependencies": { "@smithy/eventstream-serde-universal": "^2.2.0", "@smithy/types": "^2.12.0", @@ -3758,6 +3811,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.2.0.tgz", "integrity": "sha512-RHhbTw/JW3+r8QQH7PrganjNCiuiEZmpi6fYUAetFfPLfZ6EkiA08uN3EFfcyKubXQxOwTeJRZSQmDDCdUshaA==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "tslib": "^2.6.2" @@ -3770,6 +3824,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.2.0.tgz", "integrity": "sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==", + "license": "Apache-2.0", "dependencies": { "@smithy/eventstream-serde-universal": "^2.2.0", "@smithy/types": "^2.12.0", @@ -3783,6 +3838,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.2.0.tgz", "integrity": "sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==", + "license": "Apache-2.0", "dependencies": { "@smithy/eventstream-codec": "^2.2.0", "@smithy/types": "^2.12.0", @@ -3796,6 +3852,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.2.0.tgz", "integrity": "sha512-SGPoVH8mdXBqrkVCJ1Hd1X7vh1zDXojNN1yZyZTZsCno99hVue9+IYzWDjq/EQDDXxmITB0gBmuyPh8oAZSTcg==", + "license": "Apache-2.0", "dependencies": { "@smithy/chunked-blob-reader": "^2.2.0", "@smithy/chunked-blob-reader-native": "^2.2.0", @@ -3807,6 +3864,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.2.0.tgz", "integrity": "sha512-aT+HCATOSRMGpPI7bi7NSsTNVZE/La9IaxLXWoVAYMxHT5hGO3ZOGEMZQg8A6nNL+pdFGtZQtND1eoY084HgHQ==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "@smithy/util-utf8": "^2.3.0", @@ -3820,6 +3878,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.2.0.tgz", "integrity": "sha512-M26XTtt9IIusVMOWEAhIvFIr9jYj4ISPPGJROqw6vXngO3IYJCnVVSMFn4Tx1rUTG5BiKJNg9u2nxmBiZC5IlQ==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "@smithy/util-utf8": "^2.3.0", @@ -26596,9 +26655,10 @@ } }, "node_modules/googleapis": { - "version": "142.0.0", - "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-142.0.0.tgz", - "integrity": "sha512-LsU1ynez4/KNPwnFMSDI93pBEsETNdQPCrT3kz2qgiNg5H2pW4dKW+1VmENMkZ4u9lMxA89nnXD3nqWBJ0rruQ==", + "version": "144.0.0", + "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-144.0.0.tgz", + "integrity": "sha512-ELcWOXtJxjPX4vsKMh+7V+jZvgPwYMlEhQFiu2sa9Qmt5veX8nwXPksOWGGN6Zk4xCiLygUyaz7xGtcMO+Onxw==", + "license": "Apache-2.0", "dependencies": { "google-auth-library": "^9.0.0", "googleapis-common": "^7.0.0" diff --git a/package.json b/package.json index 94f65b77..145eca41 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@adobe/helix-universal-logger": "3.0.18", "@adobe/spacecat-shared-ahrefs-client": "1.5.2", "@adobe/spacecat-shared-data-access": "1.43.3", - "@adobe/spacecat-shared-google-client": "1.2.2", + "@adobe/spacecat-shared-google-client": "1.2.3", "@adobe/spacecat-shared-http-utils": "1.6.8", "@adobe/spacecat-shared-rum-api-client": "2.9.0", "@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/spacecat-shared-rum-api-client@1.8.4", From 4ef513d8fa9cc702a4846be7ba70ac34ff25a287 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 4 Sep 2024 19:16:00 +0000 Subject: [PATCH 24/26] chore(release): 1.30.3 [skip ci] ## [1.30.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.2...v1.30.3) (2024-09-04) ### Bug Fixes * **deps:** update dependency @adobe/spacecat-shared-google-client to v1.2.3 ([#395](https://github.com/adobe/spacecat-audit-worker/issues/395)) ([e92d4cd](https://github.com/adobe/spacecat-audit-worker/commit/e92d4cd9223d35f959a000134e1660c6b2d15a21)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3610753e..6c36b16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.30.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.2...v1.30.3) (2024-09-04) + + +### Bug Fixes + +* **deps:** update dependency @adobe/spacecat-shared-google-client to v1.2.3 ([#395](https://github.com/adobe/spacecat-audit-worker/issues/395)) ([e92d4cd](https://github.com/adobe/spacecat-audit-worker/commit/e92d4cd9223d35f959a000134e1660c6b2d15a21)) + ## [1.30.2](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.1...v1.30.2) (2024-09-04) diff --git a/package-lock.json b/package-lock.json index dffcccc4..1e81bc83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.2", + "version": "1.30.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.2", + "version": "1.30.3", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 145eca41..7c64975a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.2", + "version": "1.30.3", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module", From 4601b0084c8373bfda1af58f93d1bdecb382c986 Mon Sep 17 00:00:00 2001 From: Iulia Grumaz Date: Thu, 5 Sep 2024 15:53:57 +0300 Subject: [PATCH 25/26] fix(broken-backlinks): introduce auto-suggest flag for broken backlinks suggestions (#396) Temporary fix in order to disable the not so qualitative suggestions for the current auto-suggest approach. To be used in the future to enable selectively the improved auto-suggest approach (due to COGS). --- src/backlinks/handler.js | 27 ++++++++++-------- test/audits/backlinks.test.js | 54 ++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 13 deletions(-) diff --git a/src/backlinks/handler.js b/src/backlinks/handler.js index 3b825cc3..3cd165ae 100644 --- a/src/backlinks/handler.js +++ b/src/backlinks/handler.js @@ -101,18 +101,21 @@ export default async function auditBrokenBacklinks(message, context) { (backlink) => !excludedURLs?.includes(backlink.url_to), ); let brokenBacklinks = await filterOutValidBacklinks(filteredBacklinks, log); - try { - const topPages = await dataAccess.getTopPagesForSite(siteId, 'ahrefs', 'global'); - const keywords = topPages.map( - (page) => ({ - url: page.getURL(), - keyword: page.getTopKeyword(), - traffic: page.getTraffic(), - }), - ); - brokenBacklinks = enhanceBacklinksWithFixes(brokenBacklinks, keywords, log); - } catch (e) { - log.error(`Enhancing backlinks with fixes for siteId ${siteId} failed with error: ${e.message}`, e); + + if (configuration.isHandlerEnabledForSite(`${type}-auto-suggest`, site)) { + try { + const topPages = await dataAccess.getTopPagesForSite(siteId, 'ahrefs', 'global'); + const keywords = topPages.map( + (page) => ({ + url: page.getURL(), + keyword: page.getTopKeyword(), + traffic: page.getTraffic(), + }), + ); + brokenBacklinks = enhanceBacklinksWithFixes(brokenBacklinks, keywords, log); + } catch (e) { + log.error(`Enhancing backlinks with fixes for siteId ${siteId} failed with error: ${e.message}`, e); + } } auditResult = { diff --git a/test/audits/backlinks.test.js b/test/audits/backlinks.test.js index e5f339fd..f7a5a766 100644 --- a/test/audits/backlinks.test.js +++ b/test/audits/backlinks.test.js @@ -56,6 +56,14 @@ describe('Backlinks Tests', function () { enabledByDefault: false, dependencies: [], }, + 'broken-backlinks-auto-suggest': { + enabled: { + sites: ['site1', 'site2', 'site3', 'site'], + orgs: ['org1', 'org2', 'org3'], + }, + enabledByDefault: false, + dependencies: [], + }, }, jobs: [], }; @@ -317,7 +325,8 @@ describe('Backlinks Tests', function () { expect(context.log.info).to.have.been.calledWith('Successfully audited site1 for broken-backlinks type audit'); }); - it('should successfully perform an audit to detect broken backlinks based on keywords from top pages', async () => { + it('should successfully perform an audit to detect broken backlinks and suggest fixes based on keywords from top pages if auto-suggest' + + ' enabled', async () => { mockDataAccess.getSiteByID = sinon.stub().withArgs('site1').resolves(site); mockDataAccess.getTopPagesForSite.resolves([siteTopPage, siteTopPage2]); mockDataAccess.getConfiguration = sinon.stub().resolves(configuration); @@ -356,6 +365,49 @@ describe('Backlinks Tests', function () { .calledWith(context.env.AUDIT_RESULTS_QUEUE_URL, expectedMessage); }); + it('should successfully perform an audit to detect broken backlinks and not suggest fixes if auto-suggest disabled', async () => { + mockDataAccess.getSiteByID = sinon.stub().withArgs('site2').resolves(site2); + configuration.disableHandlerForSite('broken-backlinks-auto-suggest', { getId: () => site2.getId(), getOrganizationId: () => org.getId() }); + mockDataAccess.getConfiguration = sinon.stub().resolves(configuration); + + nock(site2.getBaseURL()) + .get(/.*/) + .reply(301, undefined, { location: 'https://www.foo.com' }); + + nock('https://www.foo.com') + .get(/.*/) + .reply(200); + + nock('https://ahrefs.com') + .get(/.*/) + .reply(200, auditResult); + + const expectedMessage = { + type: message.type, + url: site2.getBaseURL(), + auditContext: { + finalUrl: 'www.foo.com', + }, + auditResult: { + finalUrl: 'www.foo.com', + brokenBacklinks: auditResult.backlinks, + fullAuditRef: 'https://ahrefs.com/site-explorer/broken-backlinks?select=title%2Curl_from%2Curl_to%2Ctraffic_domain&limit=50&mode=prefix&order_by=domain_rating_source%3Adesc%2Ctraffic_domain%3Adesc&target=www.foo.com&output=json&where=%7B%22and%22%3A%5B%7B%22field%22%3A%22domain_rating_source%22%2C%22is%22%3A%5B%22gte%22%2C29.5%5D%7D%2C%7B%22field%22%3A%22traffic_domain%22%2C%22is%22%3A%5B%22gte%22%2C500%5D%7D%2C%7B%22field%22%3A%22links_external%22%2C%22is%22%3A%5B%22lte%22%2C300%5D%7D%5D%7D', + }, + }; + + const response = await auditBrokenBacklinks({ + url: site2.getId(), type: 'broken-backlinks', + }, context); + + expect(response.status).to.equal(204); + expect(mockDataAccess.getTopPagesForSite).to.not.have.been.called; + expect(mockDataAccess.addAudit).to.have.been.calledOnce; + expect(context.sqs.sendMessage).to.have.been.calledOnce; + expect(context.sqs.sendMessage).to.have.been + .calledWith(context.env.AUDIT_RESULTS_QUEUE_URL, expectedMessage); + expect(context.log.info).to.have.been.calledWith('Successfully audited site2 for broken-backlinks type audit'); + }); + it('should detect broken backlinks and save the proper audit result, even if the suggested fix fails', async () => { mockDataAccess.getSiteByID = sinon.stub().withArgs('site1').resolves(site); mockDataAccess.getTopPagesForSite.resolves([createSiteTopPage({ From 531c80e360f9e2efab9d5b24979d003163ec95f0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 5 Sep 2024 12:56:47 +0000 Subject: [PATCH 26/26] chore(release): 1.30.4 [skip ci] ## [1.30.4](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.3...v1.30.4) (2024-09-05) ### Bug Fixes * **broken-backlinks:** introduce auto-suggest flag for broken backlinks suggestions ([#396](https://github.com/adobe/spacecat-audit-worker/issues/396)) ([4601b00](https://github.com/adobe/spacecat-audit-worker/commit/4601b0084c8373bfda1af58f93d1bdecb382c986)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c36b16d..28db63b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.30.4](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.3...v1.30.4) (2024-09-05) + + +### Bug Fixes + +* **broken-backlinks:** introduce auto-suggest flag for broken backlinks suggestions ([#396](https://github.com/adobe/spacecat-audit-worker/issues/396)) ([4601b00](https://github.com/adobe/spacecat-audit-worker/commit/4601b0084c8373bfda1af58f93d1bdecb382c986)) + ## [1.30.3](https://github.com/adobe/spacecat-audit-worker/compare/v1.30.2...v1.30.3) (2024-09-04) diff --git a/package-lock.json b/package-lock.json index 1e81bc83..25e967f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.3", + "version": "1.30.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.3", + "version": "1.30.4", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "4.1.8", diff --git a/package.json b/package.json index 7c64975a..c9540a84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/spacecat-audit-worker", - "version": "1.30.3", + "version": "1.30.4", "description": "SpaceCat Audit Worker", "main": "src/index.js", "type": "module",