Skip to content

Commit

Permalink
Merge branch 'main' into sitemapsuggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiAlexandruParaschiv authored Jan 21, 2025
2 parents 46321a3 + 3b9dd9a commit 69507e2
Show file tree
Hide file tree
Showing 16 changed files with 4,559 additions and 2,668 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.48.0](https://github.com/adobe/spacecat-audit-worker/compare/v1.47.9...v1.48.0) (2025-01-21)


### Features

* introduce broken backlink auto-suggest ([#571](https://github.com/adobe/spacecat-audit-worker/issues/571)) ([03a1ee2](https://github.com/adobe/spacecat-audit-worker/commit/03a1ee2b72d0f11c1fcd017eeea3b0ce35a236ee))

## [1.47.9](https://github.com/adobe/spacecat-audit-worker/compare/v1.47.8...v1.47.9) (2025-01-21)


Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,26 @@ The `AuditBuilder` is chaining all post processors together and passing the `aud
The `auditData` object can be updated by each post processor and the updated `auditData` object will be passed to the next post processor.
If the `auditData` object is not updated by a post processor, the previous `auditData` object will be used.

The auto-suggest post processor should verify if the site is enabled for suggestions and if the audit was run successfully:

```js
export const generateSuggestionData = async (finalUrl, auditData, context, site) => {
const { dataAccess, log } = context;
const { Configuration } = dataAccess;

if (auditData.auditResult.success === false) {
log.info('Audit failed, skipping suggestions generation');
return { ...auditData };
}

const configuration = await Configuration.findLatest();
if (!configuration.isHandlerEnabledForSite('[audit-name]-auto-suggest', site)) {
log.info('Auto-suggest is disabled for site');
return {...auditData};
}x
}
```

```js
export default new AuditBuilder()
.withRunner(auditRunner)
Expand Down
4,784 changes: 3,178 additions & 1,606 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/spacecat-audit-worker",
"version": "1.47.9",
"version": "1.48.0",
"description": "SpaceCat Audit Worker",
"main": "src/index.js",
"type": "module",
Expand Down Expand Up @@ -35,7 +35,11 @@
},
"fastlyServiceId!important": "",
"timeout": 900000,
"nodeVersion": 22
"nodeVersion": 22,
"static": [
"static/prompts/broken-backlinks.prompt",
"static/prompts/broken-backlinks-followup.prompt"
]
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -63,6 +67,7 @@
"@adobe/spacecat-shared-ahrefs-client": "1.6.4",
"@adobe/spacecat-shared-data-access": "2.0.4",
"@adobe/spacecat-shared-google-client": "1.4.6",
"@adobe/spacecat-shared-gpt-client": "1.4.4",
"@adobe/spacecat-shared-http-utils": "1.9.6",
"@adobe/spacecat-shared-rum-api-client": "2.18.6",
"@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/[email protected]",
Expand Down Expand Up @@ -96,8 +101,8 @@
"chai-as-promised": "8.0.1",
"dotenv": "16.4.7",
"eslint": "8.57.1",
"husky": "9.1.7",
"esmock": "2.6.9",
"husky": "9.1.7",
"junit-report-builder": "5.1.1",
"lint-staged": "15.4.1",
"mocha": "11.0.1",
Expand Down
Loading

0 comments on commit 69507e2

Please sign in to comment.