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] 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'); + } + }); +});